num/one
Semiring one identity — the multiplicative identity for numbers
const app = mvfm(prelude);
const prog = app({ x: "number" }, ($) => {
// 1 is the semiring one; multiplying by it is an identity operation
return $.mul($.input.x, 1);
});
await fold(defaults(app), injectInput(prog, { x: 42 })); Ctrl+Enter