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

VectorExtras.Generic

Synopsis

Documentation

fromAssocListWithGen :: Vector v a => Int -> (Int -> a) -> [(Int, a)] -> v a Source #

Notice: It is your responsibility to ensure that the indices in the assoc list are within bounds.

fromAssocListWithDef :: Vector v a => Int -> a -> [(Int, a)] -> v a Source #

Notice: It is your responsibility to ensure that the indices in the assoc list are within bounds.

fromReverseListN :: Vector v a => Int -> [a] -> v a Source #

>>> fromReverseListN 3 [1,2,3] :: Data.Vector.Vector Int
[3,2,1]

initialized :: Vector v a => Int -> (forall s. Mutable v s a -> ST s ()) -> v a Source #

fromFoldable :: (Foldable f, Vector v a) => f a -> v a Source #

fromFoldableNarrowing :: (Foldable f, Vector v b) => (a -> Maybe b) -> f a -> v b Source #