Streamly.Internal.Data.Array.Generic
Documentation
Constructors
Array | |
Fields
|
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
unsafeGetIndex :: 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.
dropAround :: (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.
Deprecated
strip :: (a -> Bool) -> Array a -> Array a Source #
Deprecated: Please use dropAround instead.
Truncate the array at the beginning and end as long as the predicate holds true. Returns a slice of the original array.
getIndexUnsafe :: Int -> Array a -> a Source #
Deprecated: Please use unsafeGetIndex instead.
O(1) Lookup the element at the given index. Index starts from 0. Does not check the bounds.
Since: 0.8.0
getSliceUnsafe :: Int -> Int -> Array a -> Array a Source #
Deprecated: Please use unsafeSliceOffLen instead.