|
| Data.Vector.Fusion.Stream | | Portability | non-portable | | Stability | experimental | | Maintainer | Roman Leshchinskiy <rl@cse.unsw.edu.au> |
|
|
|
|
|
| Description |
| Streams for stream fusion
|
|
| Synopsis |
|
|
|
|
| Types
|
|
|
| Result of taking a single step in a stream
| | Constructors | | Yield a s | a new element and a new seed
| | Skip s | just a new seed
| | Done | end of stream
|
|
|
|
|
| The type of pure streams
|
|
|
| Alternative name for monadic streams
|
|
| In-place markers
|
|
|
|
|
|
| Size hints
|
|
|
| Size hint of a Stream
|
|
|
| Attach a Size hint to a Stream
|
|
| Length information
|
|
|
| Length of a Stream
|
|
|
| Check if a Stream is empty
|
|
| Construction
|
|
|
| Empty Stream
|
|
|
| Singleton Stream
|
|
|
| Prepend an element
|
|
|
| Append an element
|
|
|
| Replicate a value to a given length
|
|
|
| Concatenate two Streams
|
|
| Accessing individual elements
|
|
|
| First element of the Stream or error if empty
|
|
|
| Last element of the Stream or error if empty
|
|
|
| Element at the given position
|
|
| Substreams
|
|
|
| :: | | | => Stream a | | | -> Int | starting index
| | -> Int | length
| | -> Stream a | | | Extract a substream of the given length starting at the given position.
|
|
|
|
| All but the last element
|
|
|
| All but the first element
|
|
|
| The first n elements
|
|
|
| All but the first n elements
|
|
| Mapping
|
|
|
| Map a function over a Stream
|
|
|
|
| Zipping
|
|
|
| Zip two Streams with the given function
|
|
|
| Zip three Streams with the given function
|
|
| Filtering
|
|
|
| Drop elements which do not satisfy the predicate
|
|
|
| Longest prefix of elements that satisfy the predicate
|
|
|
| Drop the longest prefix of elements that satisfy the predicate
|
|
| Searching
|
|
|
| Check whether the Stream contains an element
|
|
|
| Inverse of elem
|
|
|
| Yield Just the first element matching the predicate or Nothing if no
such element exists.
|
|
|
| Yield Just the index of the first element matching the predicate or
Nothing if no such element exists.
|
|
| Folding
|
|
|
| Left fold
|
|
|
| Left fold on non-empty Streams
|
|
|
| Left fold with strict accumulator
|
|
|
| Left fold on non-empty Streams with strict accumulator
|
|
|
| Right fold
|
|
|
| Right fold on non-empty Streams
|
|
| Specialised folds
|
|
|
|
|
|
| Unfolding
|
|
|
| Unfold
|
|
| Scans
|
|
|
| Prefix scan
|
|
|
| Prefix scan with strict accumulator
|
|
|
| Suffix scan
|
|
|
| Suffix scan with strict accumulator
|
|
|
| Haskell-style scan
|
|
|
| Haskell-style scan with strict accumulator
|
|
|
| Scan over a non-empty Stream
|
|
|
| Scan over a non-empty Stream with a strict accumulator
|
|
| Conversions
|
|
|
| Convert a Stream to a list
|
|
|
| Create a Stream from a list
|
|
|
| Convert a pure stream to a monadic stream
|
|
| Monadic combinators
|
|
|
| Apply a monadic action to each element of the stream
|
|
|
| Monadic fold
|
|
|
| Monadic fold over non-empty stream
|
|
|
| Monadic fold with strict accumulator
|
|
|
| Monad fold over non-empty stream with strict accumulator
|
|
| Produced by Haddock version 2.4.2 |