Re: Translating circular Haskell code to lisp



MDS> I don't need a general purpose transformation, just some guidelines to
MDS> follow when I see code like this.

IMHO you can always make eager code that does same thing as lazy one, but
works faster and is much more readable. and probably lazy code won't
help you writting eager one, it's better just to throw it away and start
from scratch..

MDS> (defmacro delay (&body body) `(lambda () ,@body))
MDS> (defun force (expr) (funcall expr))

just as a note, these macros won't accurately reproduce Haskell's semantics
in some
cases -- computed value must be memorized to prevent computing it second
time.


.