Re:A difference between Haskell and Common Lisp
by lisper on Monday December 21, 2015 @03:11PM
(#10773172)
> does not provide enough to write CONSP
Yes, that's a very good point. That's why I said, "If you want to explore the relationship between Lisp and ULC..." and deliberately not, "If you want to see how to embed Lisp in ULC..."
Writing CONSP actually makes a very interesting exercise.
If you wished to implement a subset of Lisp in LC faithfully you would need an encoding for sums - which would not be all that hard, but does reflect the distance between Lisp values and the raw abstractions of the lambda calculus. (There is also the more substantial matter of RPLACD, etc, but let's just pretend that particular rabbit hole is not there.)