| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This module is intended to be imported qualified: import qualified Data.Enumerator.List as EL Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Synopsis | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
List analogues | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Folds | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Consume the entire input stream with a strict left fold, one element at a time. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Consume the entire input stream with a strict monadic left fold, one element at a time. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Maps | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
map f applies f to each input element and feeds the resulting outputs to the inner iteratee. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mapM f applies f to each input element and feeds the resulting outputs to the inner iteratee. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
mapM_ f applies f to each input element, and discards the results. Since: 0.4.11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
concatMap f applies f to each input element and feeds the resulting outputs to the inner iteratee. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
concatMapM f applies f to each input element and feeds the resulting outputs to the inner iteratee. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Accumulating maps | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Similar to map, but with a stateful step function. Since: 0.4.9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Similar to mapM, but with a stateful step function. Since: 0.4.9 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Similar to concatMap, but with a stateful step function. Since: 0.4.11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Similar to concatMapM, but with a stateful step function. Since: 0.4.11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Infinite streams | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
iterate f x enumerates an infinite stream of repeated applications of f to x. Analogous to iterate. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Similar to iterate, except the iteration function is monadic. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enumerates an infinite stream of a single element. Analogous to repeat. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enumerates an infinite stream of element. Each element is computed by the underlying monad. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Bounded streams | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
replicate n x enumerates a stream containing n copies of x. Analogous to replicate. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
replicateM n m_x enumerates a stream of n elements, with each element computed by m_x. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Like repeatM, except the computation may terminate the stream by returning Nothing. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enumerates a stream of elements by repeatedly applying a function to some state. Similar to iterate. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Enumerates a stream of elements by repeatedly applying a computation to some state. Similar to iterateM. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Filters | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Applies a predicate to the stream. The inner iteratee only receives elements for which the predicate is True. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Applies a monadic predicate to the stream. The inner iteratee only receives elements for which the predicate returns True. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Consumers | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
take n extracts the next n elements from the stream, as a list. Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
takeWhile p extracts input from the stream until the first element which does not match the predicate. Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
consume = takeWhile (const True) Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Unsorted | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Get the next element from the stream, or Nothing if the stream has ended. Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
drop n ignores n input elements from the stream. Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
dropWhile p ignores input from the stream until the first element which does not match the predicate. Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
require n buffers input until at least n elements are available, or throws an error if the stream ends early. Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
isolate n reads at most n elements from the stream, and passes them to its iteratee. If the iteratee finishes early, elements continue to be consumed from the outer stream until n have been consumed. Since: 0.4.5 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Split on elements satisfying a given predicate. Since: 0.4.8 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Remove duplicate elements from a stream, passing through the first instance of each value. Similar to nub, but more efficient because it uses a Set internally. Since: 0.4.11 | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Produced by Haddock version 2.6.1 |