Mark,
That did the trick, thanks! I'll definitely be testing my loops for
this sort of thing in the future. It's a little worrisome that it's
this easy to write a major memory leak in Clojure, but I guess this is
just one of the consequences of writing a functional language on top
of the JVM. Mayb
Hi Charles,
I notice I can stop your version from running out of memory with a very
small change. Changing from:
;; the [f & args] form of trampoline
(trampoline init start-stream)
to:
;; the [f] form of trampoline
(trampoline #(init start-stream))
seems to work as expected. I would
I've been working on a problem that requires me to write a small state
machine for processing XML documents. Out of curiousity (I'm new to
functional programming) I hit Google to see how automata are written
in other functional languages. I found Shriram Krishnamurthi's paper:
http://lambda-the-ul