// @flow export default class Queue { name: string; constructor(name) { this.name = name; } process = (fn) => { console.log(`Registered function ${this.name}`); this.processFn = fn; }; add = (data) => { console.log(`Running ${this.name}`); return this.processFn({ data }); }; }