Hoogle Search
Within LTS Haskell 24.40 (ghc-9.10.3)
Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.
many :: forall (m :: Type -> Type) b c a . Monad m => Unfold m b c -> Unfold m a b -> Unfold m a cstreamly-core Streamly.Data.Unfold Apply the first unfold to each output element of the second unfold and flatten the output in a single stream.
>>> many u = Unfold.many2 (Unfold.lmap snd u)
-
streamly-core Streamly.Internal.Data.Array.Stream Apply an ChunkFold repeatedly on an array stream and emit the fold outputs in the output stream. See "Streamly.Data.Stream.foldMany" for more details. Pre-release
-
streamly-core Streamly.Internal.Data.Fold No documentation available.
many :: forall (m :: Type -> Type) a b c . Monad m => Fold m a b -> Fold m b c -> Fold m a cstreamly-core Streamly.Internal.Data.Fold Collect zero or more applications of a fold. many first second applies the first fold repeatedly on the input stream and accumulates it's results using the second fold.
>>> two = Fold.take 2 Fold.toList >>> twos = Fold.many two Fold.toList >>> Stream.fold twos $ Stream.fromList [1..10] [[1,2],[3,4],[5,6],[7,8],[9,10]]
Stops when second fold stops. See also: concatMap, foldManymanyPost :: forall (m :: Type -> Type) a b c . Monad m => Fold m a b -> Fold m b c -> Fold m a cstreamly-core Streamly.Internal.Data.Fold Like many, but the "first" fold emits an output at the end even if no input is received. Internal See also: concatMap, foldMany
-
streamly-core Streamly.Internal.Data.Fold -
streamly-core Streamly.Internal.Data.Fold scanMany :: forall (m :: Type -> Type) a b c . Monad m => Fold m a b -> Fold m b c -> Fold m a cstreamly-core Streamly.Internal.Data.Fold Scan the input of a Fold to change it in a stateful manner using another Fold. The scan restarts with a fresh state if the fold terminates. Pre-release
unfoldMany :: forall (m :: Type -> Type) a b c . Monad m => Unfold m a b -> Fold m b c -> Fold m a cstreamly-core Streamly.Internal.Data.Fold Unfold and flatten the input stream of a fold.
Stream.fold (unfoldMany u f) = Stream.fold f . Stream.unfoldMany u
Pre-releasemany :: forall (m :: Type -> Type) a b c . Monad m => Parser a m b -> Fold m b c -> Parser a m cstreamly-core Streamly.Internal.Data.Parser Collect zero or more parses. Apply the supplied parser repeatedly on the input stream and push the parse results to a downstream fold. Stops: when the downstream fold stops or the parser fails. Fails: never, produces zero or more results.
>>> many = Parser.countBetween 0 maxBound
Compare with many.