UNPKG

wonka

Version:

A fast push & pull stream library for Reason, loosely following the [callbag spec](https://github.com/callbag/callbag)

30 lines (24 loc) 714 B
import * as Block from "bs-platform/lib/es6/block.js"; function make(f) { return (function (sink) { var teardown = f(/* record */[ /* next */(function (value) { return sink(/* Push */Block.__(1, [value])); }), /* complete */(function (param) { return sink(/* End */0); }) ]); return sink(/* Start */Block.__(0, [(function (signal) { if (signal) { return teardown(); } else { return /* () */0; } })])); }); } export { make , } /* No side effect */