On Sun, Sep 2, 2012 at 10:25 PM, Stephen Compall <stephen.comp...@gmail.com> wrote: > On Fri, 2012-08-31 at 05:08 -0700, shaobohou wrote: >> I have written the following function using take-while and a pred >> function with an atom to store the set of unique tokens. It works > > Only because in the current implementation, take-while happens to be > called in coll order, which is not a guarantee of the API.
Can you say what this means (the note about take-while being called in coll order)? Does it mean that it's not a guarantee of the API that the predicate passed to take-while be called *successively* on the items in the collection passed in? I would have hoped that would be guaranteed---otherwise you might be forcing the computation of elements of a lazy sequence unnecessarily, which could be expensive, even if there are no side-effects, or (potentially, at least) raise an exception that would otherwise not be raised. -- Ben Wolfson "Human kind has used its intelligence to vary the flavour of drinks, which may be sweet, aromatic, fermented or spirit-based. ... Family and social life also offer numerous other occasions to consume drinks for pleasure." [Larousse, "Drink" entry] -- 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