-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Utilities for the "vector" library -- -- This library is in an experimental state. Users should be prepared for -- frequent updates. @package vector-extras @version 0.2 module VectorExtras.Immutable -- | 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. chunk :: (Vector v1 a, Vector v2 (v1 a)) => Int -> v1 a -> v2 (v1 a) -- | 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. unfoldrWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> Unfoldr a -> vector a -- | 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. assocUnfoldrWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> Unfoldr (Int, a) -> vector a -- | 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. indexHashMapWithSize :: (MVector (Mutable vector) a, Vector vector a) => Int -> HashMap a Int -> vector a -- | Construct from a hash-map. indexHashMap :: (MVector (Mutable vector) a, Vector vector a) => HashMap a Int -> vector a