UNPKG

functionalscript

Version:

FunctionalScript is a purely functional subset of JavaScript

12 lines (11 loc) 269 B
import { fn } from "./module.f.js"; export default () => { const f = x => [x]; const g = ([x]) => [x.length]; const w = ([x]) => x; const r = fn(f).then(g).then(w).result; const result = r('hello'); if (result !== 5) { throw r; } };