vector-extras-0.2.6: Utilities for the "vector" library
Safe HaskellNone
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 #