on master help sign in
Recursively combine the tree with the given combinator.

- Earlier it was combining serially and this was wrong.

commit4fe9c0a273a71e069cf9a7446da57b801fa9eef0 authorPranay Sashank <pranaysashank@gmail.com> dateThu 12 Dec 2019, 14:12 (7 years ago) parentd6c883c
1 file changed+1−1
src/Streamly/Internal/Prelude.hs+1−1
src/Streamly/Internal/Prelude.hs+1−1
@@ -2643,7 +2643,7 @@ concatMapTreeWith
26432643 -> t m (Either a b)
26442644concatMapTreeWith combine f xs = concatMapWith combine go xs
26452645 where
2646− go (Left tree) = Left tree `K.cons` concatMapWith combine go (f tree)
2646+ go (Left tree) = yield (Left tree) `combine` concatMapWith combine go (f tree)
26472647 go (Right leaf) = yield $ Right leaf
26482648
26492649{-