Circular Programming in Clojure
A couple years ago, I decided to learn Haskell. This led me to develop an
interest for lambda calculus, interpreters, and laziness. (And monads,
in general as well as in Clojure, but that is less
relevant for today's topic.) While researching those topics, I came across a
paper meshing all those topics together by explaining a nice technique to
implement embedded functional languages in Haskell. On the face of it, the
technique presented seems to rely so heavily on Haskell language features —
primarily whole-language laziness — that it looks like it would be hard to
implement in any other language.This, of course, looked like a challenge to me, and I immediately started
wondering how hard it would be to implement the same technique in Clojure. Then
I got distracted and left that problem alone for a few months. That is, until I
got a bit of an epiphany while playing with prime numbers two weeks ago.
cuddly-octo-palm-tree.com