Drop elements which do not satisfy the monadic predicate
Modulererebase-1.21.2Haskell2010
Data.Vector.Fusion.Stream.Monadic
- 4 types
- 113 values
- Packagererebase-1.21.2
- Exports117
- LanguageHaskell2010
- LicenceMIT
- SourceMonadic.hs
Same as foldlM
Yield a Stream of values obtained by performing the monadic action the given number of times
Zip two Streams with the given monadic function
Left fold with a monadic operator
Right fold with a monadic operator
Execute a monadic action for each element of the Stream
Inverse of elem
Singleton Stream
Unfold
Element at the given position
Element at the given position or Nothing if out of bounds
All but the first n elements
Drop the longest prefix of elements that satisfy the predicate
Left fold over a non-empty Stream with a strict accumulator
First element of the Stream or error if empty
All but the last element
Last element of the Stream or error if empty
Replicate a value to a given length
Haskell-style scan
Haskell-style scan with strict accumulator
Initial-value free scan over a Stream
All but the first element
The first n elements
Longest prefix of elements that satisfy the predicate
Empty Stream
Check whether the Stream contains an element
Left fold
Left fold with a strict accumulator
Left fold over a non-empty Stream
Right fold
Right fold over a non-empty stream
Length of a Stream
Check if a Stream is empty
Map a monadic function over a Stream
Concatenate two Streams
Map a function over a Stream
Drop elements which do not satisfy the predicate
Enumerate values
WARNING: This operation can be very inefficient. If at all possible, use enumFromStepN instead.
Enumerate values with a given step.
WARNING: This operation is very inefficient. If at all possible, use enumFromStepN instead.
Convert a Stream to a list
Convert the first n elements of a list to a Bundle
Convert a list to a Stream
SPEC is used by GHC in the SpecConstr pass in order to inform
the compiler when to be particularly aggressive. In particular, it
tells GHC to specialize regardless of size or the number of
specializations. However, not all loops fall into this category.
Libraries can specify this by using SPEC data type to inform which loops should be aggressively specialized. For example, instead of
loop x where loop arg = ...write
loop SPEC x where loop !_ arg = ...There is no semantic difference between SPEC and SPEC2,
we just need a type with two constructors lest it is optimised away
before SpecConstr.
This type is reexported from GHC.Exts since GHC 9.0 and base-4.15.
For compatibility with earlier releases import it from GHC.Types
in ghc-prim package.
Prepend an element
Left fold with a strict accumulator and a monadic operator
Append an element
Result of taking a single step in a stream
Lexicographically compare two Streams
Yield a Stream of the given length containing the values x, x+y,
x+y+y etc.
Check if two Streams are equal
Same as foldl1M
Same as foldl1M'
Same as foldlM'
Pair each element in a Stream with its index
Pair each element in a Stream with its index, starting from the right and counting down
O(n) Apply function \max(n - 1, 0) times to an initial value,
producing a stream of \max(n, 0) values.
Apply monadic function to each element and drop all Nothings
Suffix scan
Suffix scan with strict accumulator
Prefix scan
Prefix scan with strict accumulator
Initial-value free scan over a Stream with a strict accumulator
Extract a substream of the given length starting at the given position.
Unfold exactly n elements
Generate a stream from its indices
Drop the longest prefix of elements that satisfy the monadic predicate
Left fold over a non-empty Stream with a monadic operator
Left fold over a non-empty Stream with a strict accumulator and a monadic operator
Right fold over a non-empty stream with a monadic operator
Suffix scan with a monadic operator
Suffix scan with strict acccumulator and a monadic operator
Prefix scan with a monadic operator
Prefix scan with strict accumulator and a monadic operator
Initial-value free scan over a Stream with a monadic operator
Initial-value free scan over a Stream with a strict accumulator and a monadic operator
Longest prefix of elements that satisfy the monadic predicate
O(n) Apply monadic function \max(n - 1, 0) times to an initial value,
producing a stream of \max(n, 0) values.
Unfold exactly n elements with a monadic function.
Unfold with a monadic function
Unfold at most n elements with a monadic function.
Drop repeated adjacent elements.
Transform a Stream to use a different monad
Haskell-style scan with a monadic operator
Haskell-style scan with strict accumulator and a monadic operator