On Tue, Jan 17, 2012 at 12:20 AM, Brandon Harvey <sando...@gmail.com> wrote:
> Sorry to be naive, but can I ask why you folks are not using recur?

Because we're using lazy-seq instead, which ends up having a similar
effect to trampoline (the "recursion" actually winds up as a
succession of calls to the function inside a loop somewhere else --
with trampoline, inside trampoline, and with lazy-seq, inside whatever
code eventually ends up traversing the sequence by calling next on it
repeatedly. Usually, a loop inside a function like map or a macro like
for, though a loop in user code could happen, e.g. (loop [s (seq foo)
...] (if s (... (recur (next s) ...) ...))).

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to