Open Lysxia opened 5 years ago
One possibility is to implement S
/K
/I
or B
/C
/K
/W
combinators, which can be to eliminate abstraction and express any term from a lambda calculus.
That's true, and the library already has sufficiently expressive combinators. My worry was that encoding arbitrary lambda terms into combinators by hand does not seem the most pleasant experience. Another possibility is to always defunctionalize (i.e., name all functions).
At the moment constructing functions with the existing combinators is still quite a puzzle. There should be an easier way to implement arbitrary anonymous functions.
One idea is to add an "environment" argument to
Eval
that can be referenced/updated by some special fcfs. (That would look very much like apply-style defun.)