unzipWith package:streamly-core

Split elements in the input stream into two parts using a pure splitter function, direct each part to a different fold and zip the results. Definitions:
>>> unzipWith f = Fold.unzipWithM (return . f)

>>> unzipWith f fld1 fld2 = Fold.lmap f (Fold.unzip fld1 fld2)
This fold terminates when both the input folds terminate. Pre-release
Similar to unzipWithM but terminates when the first fold terminates.
Like unzipWith but with a monadic splitter function. Definition:
>>> unzipWithM k f1 f2 = Fold.lmapM k (Fold.unzip f1 f2)
Pre-release
Similar to unzipWithM but terminates when any fold terminates.