An experiment in parentheses-free lisp (in JavaScript)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
253 B

function compose(f, g) {
return function(x) {
return f(g(x));
};
}
function not(x) {
return !x;
}
function on(g, f) {
return function(x,y) {
return g(f(x), f(y));
};
}
module.exports = {compose : compose,
not : not,
on : on}