Hoogle Search

Within LTS Haskell 24.36 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. chunksOf :: forall t (m :: Type -> Type) a b . (IsStream t, Monad m) => Int -> Fold m a b -> t m a -> t m b

    streamly Streamly.Prelude

    Group the input stream into groups of n elements each and then fold each group using the provided fold function.

    >>> Stream.toList $ Stream.chunksOf 2 Fold.sum (Stream.enumerateFromTo 1 10)
    [3,7,11,15,19]
    
    This can be considered as an n-fold version of take where we apply take repeatedly on the leftover stream until the stream exhausts.
    chunksOf n f = foldMany (FL.take n f)
    

  2. chunksOf :: Int -> [a] -> [[a]]

    xmonad-contrib XMonad.Prelude

    Given a maximum length, splits a list into sublists

    >>> chunksOf 5 (take 30 $ repeat 'a')
    ["aaaaa","aaaaa","aaaaa","aaaaa","aaaaa","aaaaa"]
    

  3. chunksOfCE :: forall (m :: Type -> Type) seq . (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m ()

    conduit Conduit

    Split input into chunk of size chunkSize The last element may be smaller than the chunkSize (see also chunksOfExactlyE which will not yield this last element)

  4. chunksOfExactlyCE :: forall (m :: Type -> Type) seq . (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m ()

    conduit Conduit

    Split input into chunk of size chunkSize If the input does not split into chunks exactly, the remainder will be leftover (see also chunksOfE)

  5. chunksOfE :: forall (m :: Type -> Type) seq . (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m ()

    conduit Data.Conduit.Combinators

    Split input into chunk of size chunkSize The last element may be smaller than the chunkSize (see also chunksOfExactlyE which will not yield this last element)

  6. chunksOfExactlyE :: forall (m :: Type -> Type) seq . (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m ()

    conduit Data.Conduit.Combinators

    Split input into chunk of size chunkSize If the input does not split into chunks exactly, the remainder will be leftover (see also chunksOfE)

  7. chunksOf' :: forall (m :: Type -> Type) n r . (Monad m, Integral n) => n -> Producer ByteString m r -> Producer ByteString m r

    pipes-bytestring Pipes.ByteString

    Group byte stream chunks into chunks of fixed length Note: This is the only function in this API that concatenates ByteString chunks, which requires allocating new ByteStrings

  8. chunksOf' :: Int -> JSString -> [JSString]

    jsaddle Data.JSString

    O(n) Splits a JSString into components of length k. The last element may be shorter than the other chunks, depending on the length of the input. Examples:

    chunksOf 3 "foobarbaz"   == ["foo","bar","baz"]
    chunksOf 4 "haskell.org" == ["hask","ell.","org"]
    

  9. chunksOfCE :: forall (m :: Type -> Type) seq . (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m ()

    classy-prelude-conduit ClassyPrelude.Conduit

    Split input into chunk of size chunkSize The last element may be smaller than the chunkSize (see also chunksOfExactlyE which will not yield this last element)

  10. chunksOfExactlyCE :: forall (m :: Type -> Type) seq . (Monad m, IsSequence seq) => Index seq -> ConduitT seq seq m ()

    classy-prelude-conduit ClassyPrelude.Conduit

    Split input into chunk of size chunkSize If the input does not split into chunks exactly, the remainder will be leftover (see also chunksOfE)

Page 4 of many | Previous | Next