Working around lambda calculus in JavaScript