I can't speak for the core.async implementers, of course, but I've been working on a similar library for Javascript, and had to realised that not all sequence operations make sense, or are even possible in the context of channels.
The one you mentioned, take-while, is a good example. Once you've taken the first item from the channel that does not satisfy the predicate, there is no way to put it back without breaking the abstraction. So I think the best one could do in order not to lose any data is implement something like a 'take-until' that produces all elements of the channel up until the first one that satisfies a given predicate. Cheers, Olaf On Monday, 27 January 2014 02:53:55 UTC+11, Daniel Solano Gómez wrote: > > Hello, all, > > I have just started using core.async, and I was curious as to why > particular sequence functions where chosen to be implemented. For > example, there is take, but no take-while or drop. Is this a deliberate > design decision? > > Thanks for the great library! > > Sincerely, > > Daniel > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.