Finished is a predicate which designates when the seed is exhausted.
Because seed is not necessary a sequence, finished is not always
empty?.



For instance:



=> (unfold (fn [x] [(* x x) (inc x)]) #(> % 10) 0)

(0 1 4 9 16 25 36 49 64 81 100)



Or the zipmap (zip2) example from the wikipedia page.



Although the first example wanders back into territory where the
existing sequence functions such as iterate, take-while and for would
suffice.

-Gijs

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