What is the intended usage of halt-when? 

The naming of halt-when hints at imperative / non-collection contexts but 
I'm failing to guess what such a context could look like? 

What is an intended usecase for the default behavior "the input that 
triggered the predicate will be returned"? 

For collection contexts, it seems odd that the transduced result is not 
opaque to retf because it requires one to make the transducer depend on the 
later application which breaks promise/design of transducers as reusable 
algorithmic transformations in many contexts.

To illustrate

(into [] (halt-when true? conj) [false false true])

Doesn't work because into internally uses transients. One has to (halt-when 
true? conj!), then [false false true] is returned - but it is a hack using 
the internals of into.

(sequence (halt-when true? conj) [false false true])

Returns (false false), a different result.

For core.async channels I can imagine that it doesn't work at all, but have 
not tried.

-- 
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/d/optout.

Reply via email to