basement-0.0.15: Foundation scrap box of array & string
Safe Haskell None
Language Haskell2010

Basement.Sized.Vect

Documentation

data MVect (n :: Nat ) ty st Source #

replicate :: forall n ty. ( KnownNat n, Countable ty n) => ty -> Vect n ty Source #

map :: (a -> b) -> Vect n a -> Vect n b Source #

foldl' :: (a -> ty -> a) -> a -> Vect n ty -> a Source #

foldr :: (ty -> a -> a) -> a -> Vect n ty -> a Source #

sub :: forall i j n ty. ((i <=? n) ~ ' True , (j <=? n) ~ ' True , (i <=? j) ~ ' True , KnownNat i, KnownNat j, Offsetable ty i, Offsetable ty j) => Vect n ty -> Vect (j - i) ty Source #

uncons :: forall n ty. ( CmpNat 0 n ~ ' LT , KnownNat n, Offsetable ty n) => Vect n ty -> (ty, Vect (n - 1) ty) Source #

unsnoc :: forall n ty. ( CmpNat 0 n ~ ' LT , KnownNat n, Offsetable ty n) => Vect n ty -> ( Vect (n - 1) ty, ty) Source #

splitAt :: forall i n ty. ( CmpNat i n ~ ' LT , KnownNat i, Countable ty i) => Vect n ty -> ( Vect i ty, Vect (n - i) ty) Source #

sortBy :: (ty -> ty -> Ordering ) -> Vect n ty -> Vect n ty Source #