vector-extras-0.2.8: Utilities for the "vector" library
Safe HaskellSafe-Inferred
LanguageHaskell2010

VectorExtras.Immutable

Synopsis

Documentation

chunk :: (Vector v1 a, Vector v2 (v1 a)) => Int -> v1 a -> v2 (v1 a) Source #

Distribute the elements of a vector across the specified amount of chunks.

Depending on the size of the vector the first chunks may be larger in size then the others by one.

unfoldrWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> Unfoldr a -> vector a Source #

Construct from an unfoldr of the specified size.

It is your responsibility to ensure that the unfoldr is of the same size as the one specified.

assocUnfoldrWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> Unfoldr (Int, a) -> vector a Source #

Construct from an unfoldr of associations of the specified size.

It is your responsibility to ensure that the indices in the unfoldr are within the specified size.

indexHashMapWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> HashMap a Int -> vector a Source #

Construct from a hash-map of the specified size.

It is your responsibility to ensure that the indices in the unfoldr are within the specified size.

indexHashMap :: (MVector (Mutable vector) a, Vector vector a) => HashMap a Int -> vector a Source #

Construct from a hash-map.