Skip to content

Instantly share code, notes, and snippets.

View Fyzu's full-sized avatar
👊
Let's Code!

Dmitry Petrov Fyzu

👊
Let's Code!
View GitHub Profile
@dypsilon
dypsilon / continuation.js
Created August 8, 2016 09:27
Eager Continuation in JavaScript
const {tagged} = require('daggy');
let Continuation = tagged('x');
Continuation.prototype.of = Continuation.of = x => {
return new Continuation((resolve) => resolve(x));
}
Continuation.prototype.chain = function(f) {
return this.x(f);