Open
Description
Is it good idea to add the following to Data.Vector.Generic
? Thank you.
iconcatMap
iconcatMap :: (Vector v a, Vector v b) => (Int -> a -> v b) -> v a -> v b
{-# INLINE iconcatMap #-}
iconcatMap f = unstream
. Bundle.concatVectors
. Bundle.inplace (S.map (uncurry f) . S.indexed) id
. stream
concatMapM
concatMapM :: (Monad m, Vector v a, Vector v b) => (a -> m (v b)) -> v a -> m (v b)
{-# INLINE concatMapM #-}
concatMapM f = unstreamM
. MBundle.concatVectors
. MBundle.mapM f
. MBundle.fromVector
iconcatMapM
iconcatMapM :: (Monad m, Vector v a, Vector v b) => (Int -> a -> m (v b)) -> v a -> m (v b)
{-# INLINE iconcatMapM #-}
iconcatMapM f = unstreamM
. MBundle.concatVectors
. MBundle.mapM (uncurry f)
. MBundle.indexed
. MBundle.fromVector
Metadata
Metadata
Assignees
Labels
No labels