Copyright | (c) 2017 Composewell Technologies |
---|---|
License | BSD3 |
Maintainer | streamly@composewell.com |
Stability | experimental |
Portability | GHC |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Deprecated: Use Streamly.Data.Stream.MkType instead.
To run examples in this module:
>>>
import qualified Streamly.Prelude as Stream
>>>
import qualified Streamly.Internal.Data.Stream as D
>>>
import qualified Streamly.Data.Fold as Fold
Synopsis
- newtype ZipSerialM m a = ZipSerialM {
- getZipSerialM :: Stream m a
- type ZipSerial = ZipSerialM IO
- consMZip :: Monad m => m a -> ZipSerialM m a -> ZipSerialM m a
- zipWithK :: Monad m => (a -> b -> c) -> Stream m a -> Stream m b -> Stream m c
- zipWithMK :: Monad m => (a -> b -> m c) -> Stream m a -> Stream m b -> Stream m c
- newtype ZipConcurrent m a = ZipConcurrent {
- getZipConcurrent :: Stream m a
- type ZipStream = ZipSerialM
Documentation
newtype ZipSerialM m a Source #
For ZipSerialM
streams:
(<>) = serial
(*) = 'Streamly.Prelude.serial.zipWith' id
Applicative evaluates the streams being zipped serially:
>>>
s1 = Stream.fromFoldable [1, 2]
>>>
s2 = Stream.fromFoldable [3, 4]
>>>
s3 = Stream.fromFoldable [5, 6]
>>>
Stream.toList $ Stream.fromZipSerial $ (,,) <$> s1 <*> s2 <*> s3
[(1,3,5),(2,4,6)]
Since: 0.2.0 (Streamly)
Since: 0.8.0
ZipSerialM | |
|
Instances
type ZipSerial = ZipSerialM IO Source #
consMZip :: Monad m => m a -> ZipSerialM m a -> ZipSerialM m a Source #
newtype ZipConcurrent m a Source #
ZipConcurrent | |
|
Instances
MonadAsync m => Applicative (ZipConcurrent m) Source # | An IO stream whose applicative instance zips streams concurrently. Note that it uses the default concurrency options.
Since: 0.9.0 |
Defined in Streamly.Internal.Data.Stream.Zip pure :: a -> ZipConcurrent m a Source # (<*>) :: ZipConcurrent m (a -> b) -> ZipConcurrent m a -> ZipConcurrent m b Source # liftA2 :: (a -> b -> c) -> ZipConcurrent m a -> ZipConcurrent m b -> ZipConcurrent m c Source # (*>) :: ZipConcurrent m a -> ZipConcurrent m b -> ZipConcurrent m b Source # (<*) :: ZipConcurrent m a -> ZipConcurrent m b -> ZipConcurrent m a Source # | |
Monad m => Functor (ZipConcurrent m) Source # | |
Defined in Streamly.Internal.Data.Stream.Zip fmap :: (a -> b) -> ZipConcurrent m a -> ZipConcurrent m b Source # (<$) :: a -> ZipConcurrent m b -> ZipConcurrent m a Source # |
Deprecated
type ZipStream = ZipSerialM Source #
Since: 0.1.0