Skip to content

Instantly share code, notes, and snippets.

@yelouafi
yelouafi / multishot-callcc.js
Created September 21, 2018 17:05
multi shot continuations
function isGenerator(x) {
return x != null && typeof x.next === "function"
}
function isFrame(x) {
return x != null && x._type_ === 'call_frame'
}
function call(genFunc, ...args) {