Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- chunk :: (Vector v1 a, Vector v2 (v1 a)) => Int -> v1 a -> v2 (v1 a)
- unfoldrWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> Unfoldr a -> vector a
- assocUnfoldrWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> Unfoldr (Int, a) -> vector a
- indexHashMapWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> HashMap a Int -> vector a
- indexHashMap :: (MVector (Mutable vector) a, Vector vector a) => HashMap a Int -> vector a
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.