Documentation
Array | |
|
Instances
Read a => Read (Array a) Source # | |
Show a => Show (Array a) Source # | |
Eq a => Eq (Array a) Source # | |
Ord a => Ord (Array a) Source # | |
Defined in Streamly.Internal.Data.Array.Generic |
Construction
create :: MonadIO m => Fold m a (Array a) Source #
Fold the whole input to a single array.
Caution! Do not use this on infinite streams.
Elimination
Random Access
getIndexUnsafe :: Int -> Array a -> a Source #
O(1) Lookup the element at the given index. Index starts from 0. Does not check the bounds.
Since: 0.8.0
getIndex :: Int -> Array a -> Maybe a Source #
Lookup the element at the given index. Index starts from 0.
strip :: (a -> Bool) -> Array a -> Array a Source #
Truncate the array at the beginning and end as long as the predicate holds true. Returns a slice of the original array.