functionalscript
Version:
FunctionalScript is a purely functional subset of JavaScript
19 lines (18 loc) • 403 B
JavaScript
import * as _ from "./module.f.js";
import * as ascii from "../text/ascii/module.f.js";
const { one } = ascii;
import * as j from "../json/module.f.js";
const { stringify } = j;
const s = stringify(i => i);
const f = v => {
const n = one(v);
return s(_.init(n)[0]);
};
export default {
a: () => {
const x = f('1');
if (x != '["1"]') {
throw x;
}
}
};