console
Implementation of the Console API. The interpreter requires a console object to write to.
The playground redirects output using createConsoleInterpreter() so that logs appear inline.
const app = mvfm(prelude, console_);
const prog = app({ name: "string" }, ($) =>
$.begin(
$.console.log("hello", $.input.name),
$.console.warn("this is a warning"),
42
)
);
await fold(defaults(app), injectInput(prog, { name: "world" })); Ctrl+Enter