on master help sign in
Release teeWith
commit9231d2d67c03f6fafb68056b2d726f0fcfb0d7b4 authorAdithya Kumar <adithya@composewell.com> dateThu 4 Mar 2021, 19:50 (6 years ago) parent0bd94d9
3 files changed+3−2
Changelog.md+1 src/Streamly/Data/Fold.hs+1 src/Streamly/Internal/Data/Fold/Types.hs+1−2
Changelog.md+1
@@ -36,6 +36,7 @@
3636
3737* New encoding/decoding routines, `encodeUtf8'`, `encodeLatin1'`, `decodeUtf8'`,
3838 are added, these routines fail when they encounter any invalid characters.
39+* `teeWith` is released as a part of `Streamly.Data.Fold`
3940
4041### Bug Fixes
4142
src/Streamly/Data/Fold.hs+1
@@ -214,6 +214,7 @@ module Streamly.Data.Fold
214214 -- The 'Num', 'Floating', and 'Fractional' instances work in the same way.
215215
216216 , tee
217+ , teeWith
217218 , distribute
218219
219220 -- * Partitioning
src/Streamly/Internal/Data/Fold/Types.hs+1−2
@@ -599,8 +599,7 @@ instance Monad m => Applicative (Fold m a) where
599599-- | @teeWith k f1 f2@ distributes its input to both @f1@ and @f2@ until both
600600-- of them terminate and combines their output using @k@.
601601--
602−-- /Internal/
603−--
602+-- @since 0.8.0
604603{-# INLINE teeWith #-}
605604teeWith :: Monad m => (a -> b -> c) -> Fold m x a -> Fold m x b -> Fold m x c
606605teeWith f (Fold stepL beginL doneL) (Fold stepR beginR doneR) =