Fork me on GitHub

Is the default behavior of a channel the same as having a buffer of size 0? That is, is (chan) the same as (chan 0)?


Ah, I see, transducers only work with a buffer >=1


Why is that?

Alex Miller (Clojure team)21:08:48

because transducers may produce intermediate values

Alex Miller (Clojure team)21:08:53

and they have to have somewhere to go

Alex Miller (Clojure team)22:08:18

(chan 0) should actually throw an error (I have a ticket and patch for this, but haven’t gotten it applied yet)