fiber
Concurrency primitives for parallel execution, racing, timeouts, and retries. Concurrency is opt-in and bounded.
Included on the default interpreter.
const app = mvfm(prelude, fiber);
const prog = app({ x: "number" }, ($) => {
const fast = $.add($.input.x, 1);
const slow = $.mul($.input.x, 100);
return $.race(fast, slow);
});
await fold(defaults(app), injectInput(prog, { x: 5 })); Ctrl+Enter