You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for this fantastic library. I've noticed a little problem with cat (and consequently with mapcat) that is demonstrated in the following gist: https://gist.github.com/odf/ae937c46f7f95e9e4e57
The issue here is that the step method of the internal transformer used within Cat#step unwraps (derefs) a reduced value, but in fact should put an extra wrapper around it, due to the fact that one will be removed by the reduce call in Cat#step. This means that effectively in a composed transformer, an inner take or takeWhile will be ignored by an outer mapcat, and we loose part of the ability to deal sanely with things like 'infinite' lazy seqs or channels.
The fix is very small, but I'm happy to prepare a pull request if you like.
PS: I had to cheat and look up the proper handling of reduced values in cat in the Clojure implementation.
The text was updated successfully, but these errors were encountered:
Thanks for this fantastic library. I've noticed a little problem with
cat
(and consequently withmapcat
) that is demonstrated in the following gist: https://gist.github.com/odf/ae937c46f7f95e9e4e57The issue here is that the
step
method of the internal transformer used withinCat#step
unwraps (derefs) a reduced value, but in fact should put an extra wrapper around it, due to the fact that one will be removed by thereduce
call inCat#step
. This means that effectively in a composed transformer, an innertake
ortakeWhile
will be ignored by an outermapcat
, and we loose part of the ability to deal sanely with things like 'infinite' lazy seqs or channels.The fix is very small, but I'm happy to prepare a pull request if you like.
PS: I had to cheat and look up the proper handling of reduced values in
cat
in the Clojure implementation.The text was updated successfully, but these errors were encountered: