primitive-extras-0.1.5: Extras for the "primitive" library

Safe HaskellNone
LanguageHaskell2010

PrimitiveExtras.Monad

Synopsis

Documentation

primMultiArray :: (Monad m, Prim element) => Int -> (forall x. Fold (Int, element) x -> m x) -> m (PrimMultiArray element) Source #

Given a size of the outer array and a function, which executes a fold over indexed elements in a monad, constructs a prim multi-array