CuppoJava a écrit :
> I'm trying to accomplish the following:
> Create a lazy sequence of calls to f() while pred() is true.
> And an elegant way to do this seems to be:
>
> (for [:while (pred)] (f))
>
> which doesn't work because (for) requires a binding.
> This can be worked around with:
>
> (for [i (constantly 0) :while (pred)] (f))
>   

(pred) does not depend on (f)? Is there some IO or mutable state?

-- 
Professional: http://cgrand.net/ (fr)
On Clojure: http://clj-me.blogspot.com/ (en)



--~--~---------~--~----~------------~-------~--~----~
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
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