HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulestreamly-core-0.2.2Haskell2010

Streamly.Internal.Data.Array.Generic

  • 1 type
  • 27 values
datadata Array a
#

Constructors

Instances4Eq, Ord, Read, Show
  • Eq a => Eq (Array a)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Array.Generic
  • Ord a => Ord (Array a)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Array.Generic
  • Read a => Read (Array a)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Array.Generic
  • Show a => Show (Array a)Defined in streamly-core-0.2.2 · Streamly.Internal.Data.Array.Generic

Construction

12 declarations
valuecreate :: MonadIO m => Fold m a (Array a)
#

Fold the whole input to a single array.

Caution! Do not use this on infinite streams.

Elimination

9 declarations

Random Access

4 declarations
valuegetIndexUnsafe :: Int -> Array a -> a
#

O(1) Lookup the element at the given index. Index starts from 0. Does not check the bounds.

valuestrip :: (a -> Bool) -> Array a -> Array a
#

Truncate the array at the beginning and end as long as the predicate holds true. Returns a slice of the original array.

Deprecated

2 declarations