Get the latest tech news
Implementing a functional language with graph reduction (2021)
Abstract Implementing a small functional language with a classic combinator based graph-reduction machine in Haskell. The implementation is structured into three parts: A λ-calculus parser from A Combinatory Compiler which was extended to cover a tiny functional language based on the untyped λ-calculus.
Schönfinkel and Curry found out that any closed λ-term can be rewritten in terms of three basic combinators I, K and S (in fact only K and S are essential, as I can be expressed as SKK): The last step of the diagram shows that - in the graph - self-reproduction can be achieved by simply bending the argument pointer back to the application node. Extending this very basic setup to a fully working pogramming environment with a REPL Implement direct and mutual recursion (i.e. letrec) for global function definitions experimemnt with different bracket abstraction algorithms to improve object code size and execution time.
Or read this on Hacker News