enumerator-0.4.7: Reliable, high-performance processing with left-fold enumerators

Portabilityportable
Maintainerjmillikin@gmail.com

Data.Enumerator.List

Description

This module is intended to be imported qualified:

 import qualified Data.Enumerator.List as EL

Since: 0.4.5

Synopsis

Documentation

head :: Monad m => Iteratee a m (Maybe a)Source

Get the next element from the stream, or Nothing if the stream has ended.

Since: 0.4.5

drop :: Monad m => Integer -> Iteratee a m ()Source

drop n ignores n input elements from the stream.

Since: 0.4.5

dropWhile :: Monad m => (a -> Bool) -> Iteratee a m ()Source

dropWhile p ignores input from the stream until the first element which does not match the predicate.

Since: 0.4.5

take :: Monad m => Integer -> Iteratee a m [a]Source

take n extracts the next n elements from the stream, as a list.

Since: 0.4.5

takeWhile :: Monad m => (a -> Bool) -> Iteratee a m [a]Source

takeWhile p extracts input from the stream until the first element which does not match the predicate.

Since: 0.4.5

consume :: Monad m => Iteratee a m [a]Source

Read all remaining input elements from the stream, and return as a list.

Since: 0.4.5

require :: Monad m => Integer -> Iteratee a m ()Source

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 :: Monad m => Integer -> Enumeratee a a m bSource

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