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

which is not as elegant.

Does anyone else think this is a worthwhile to "for"? Thanks for your
opinions.
  -Patrick
--~--~---------~--~----~------------~-------~--~----~
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