Hey all!

I am trying to filter a sequence until a false value is returned.  Is
there a control-flow form to do this?  ( I know I could write a loop
statement to do it)

Here are more details of what I am actually trying to do, in case
above is not clear.


input is the lazy sequence of primes:

(use '[clojure.contrib.lazy-seqs :only (primes)])

I would like to filter the lazy sequence of primes for all of the
primes less than 2,000,000

If I try:

(filter #(while (< % 20)) primes)

It gets hung up since filter keeps testing primes, despite the fact
that they have grown too large.  So, I would like filter to stop at
the first false result.

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