I've written a letrec macro with the goal of hopefully tying the knot
[1] in Clojure etc. Some examples of what it can do are included in
the Gist (including -- as of now -- two not immediately rewritable in
terms of letfn). So far I haven't caught any bugs, but hey, it's about
an hour old and the knot is still untied... Any comments / suggestions
/ remarks on this being crazy?
Sincerely,
Michał
Thanks!
Trampoline in letrec automatically breaks all cases where the value
being bound to the local is not a function, so it would interfere with
what I'm trying to do. Having said that, it seems to me that it's a
very cool idea for a custom letfn variant permitting mutual recursion
of unbounded depth. I'll investigate this further.
All the best,
Michał