UNPKG

@thi.ng/pointfree

Version:

Pointfree functional composition / Forth style stack execution engine

10 lines (9 loc) 250 B
import { $ } from "./safe.js"; const print = (ctx) => ($(ctx[0], 1), console.log(ctx[0].pop()), ctx); const printds = (ctx) => (console.log(ctx[0]), ctx); const printrs = (ctx) => (console.log(ctx[1]), ctx); export { print, printds, printrs };