on master help sign in
Release teeWith
9231d2dAdithya Kumar
Changelog.md+1
@@ -36,6 +36,7 @@
36
36
37* New encoding/decoding routines, `encodeUtf8'`, `encodeLatin1'`, `decodeUtf8'`,
37* New encoding/decoding routines, `encodeUtf8'`, `encodeLatin1'`, `decodeUtf8'`,
38 are added, these routines fail when they encounter any invalid characters.
38 are added, these routines fail when they encounter any invalid characters.
39+* `teeWith` is released as a part of `Streamly.Data.Fold`
39
40
40### Bug Fixes
41### Bug Fixes
41
42
src/Streamly/Data/Fold.hs+1
@@ -214,6 +214,7 @@ module Streamly.Data.Fold
214 -- The 'Num', 'Floating', and 'Fractional' instances work in the same way.
214 -- The 'Num', 'Floating', and 'Fractional' instances work in the same way.
215
215
216 , tee
216 , tee
217+ , teeWith
217 , distribute
218 , distribute
218
219
219 -- * Partitioning
220 -- * Partitioning
src/Streamly/Internal/Data/Fold/Types.hs+1−2
@@ -599,8 +599,7 @@ instance Monad m => Applicative (Fold m a) where
599-- | @teeWith k f1 f2@ distributes its input to both @f1@ and @f2@ until both
599-- | @teeWith k f1 f2@ distributes its input to both @f1@ and @f2@ until both
600-- of them terminate and combines their output using @k@.
600-- of them terminate and combines their output using @k@.
601--
601--
602−-- /Internal/
602+-- @since 0.8.0
603−--
604{-# INLINE teeWith #-}
603{-# INLINE teeWith #-}
605teeWith :: Monad m => (a -> b -> c) -> Fold m x a -> Fold m x b -> Fold m x c
604teeWith :: Monad m => (a -> b -> c) -> Fold m x a -> Fold m x b -> Fold m x c
606teeWith f (Fold stepL beginL doneL) (Fold stepR beginR doneR) =
605teeWith f (Fold stepL beginL doneL) (Fold stepR beginR doneR) =