3 ms·
This killed it for me: class Callback ..... this.then = g => new Callback(callback => Can't we just keep OOP out of FP?
by cutler 10y ago
This killed it for me:
class Callback
.....
this.then = g => new Callback(callback =>
Can't we just keep OOP out of FP?
- homami 10y agoUsing class enables us to chain instances naturally in JS syntax, especially because JS lacks infix functions or custom operators. o1.then(f).then(g).run(cb)
- BinaryIdiot 10y agoYou can avoid the class syntax here and write a function to return the same if you prefer.