Skip to content

Latest commit

 

History

History
79 lines (73 loc) · 10.5 KB

README.markdown

File metadata and controls

79 lines (73 loc) · 10.5 KB

cons / car / cdr in λ

Recently, I was reminded about the nice λ-based implementation of Scheme’s cons, car and cdr “primitives” (or special forms, as Scheme calls them). Of course, being implemented just in terms of λ doesn’t actually make them so “primitive” any more.

This is a nice example of how not only code is data, but also data is code.

Here’s the Scheme code and ports to many other languages:

Untested