Hoogle Search

Within LTS Haskell 24.40 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. imap :: forall r ix e a . (Index ix, Source r e) => (ix -> e -> a) -> Array r ix e -> Array D ix a

    massiv Data.Massiv.Array

    Map an index aware function over an array

  2. imapIO :: forall r ix b r' a m . (Size r', Load r' ix a, Manifest r b, MonadUnliftIO m) => (ix -> a -> m b) -> Array r' ix a -> m (Array r ix b)

    massiv Data.Massiv.Array

    Same as mapIO but map an index aware action instead. Respects computation strategy.

  3. imapIO_ :: forall r ix e a m . (Load r ix e, MonadUnliftIO m) => (ix -> e -> m a) -> Array r ix e -> m ()

    massiv Data.Massiv.Array

    Same as mapIO_, but map an index aware action instead.

  4. imapM :: forall r ix b r' a m . (Source r' a, Manifest r b, Index ix, Monad m) => (ix -> a -> m b) -> Array r' ix a -> m (Array r ix b)

    massiv Data.Massiv.Array

    Map an index aware monadic action over an array sequentially.

  5. imapM_ :: (Index ix, Source r a, Monad m) => (ix -> a -> m b) -> Array r ix a -> m ()

    massiv Data.Massiv.Array

    Map a monadic index aware function over an array sequentially, while discarding the result.

    Examples

    >>> import Data.Massiv.Array
    
    >>> imapM_ (curry print) $ range Seq (Ix1 10) 15
    (0,10)
    (1,11)
    (2,12)
    (3,13)
    (4,14)
    

  6. imapSchedulerM_ :: (Index ix, Source r e, MonadPrimBase s m) => Scheduler s () -> (ix -> e -> m a) -> Array r ix e -> m ()

    massiv Data.Massiv.Array

    Same as imapM_, but will use the supplied scheduler.

  7. imapWS :: forall r ix b r' a s m . (Source r' a, Manifest r b, Index ix, MonadUnliftIO m, PrimMonad m) => WorkerStates s -> (ix -> a -> s -> m b) -> Array r' ix a -> m (Array r ix b)

    massiv Data.Massiv.Array

    Same as imapIO, but ignores the inner computation strategy and uses stateful workers during computation instead. Use initWorkerStates for the WorkerStates initialization.

  8. dimapStencil :: (c -> d) -> (a -> b) -> Stencil ix d a -> Stencil ix c b

    massiv Data.Massiv.Array.Stencil

    A Profunctor dimap. Same caviat applies as in lmapStencil

  9. lmapStencil :: (c -> d) -> Stencil ix d a -> Stencil ix c a

    massiv Data.Massiv.Array.Stencil

    A contravariant map of a second type parameter. In other words map a function over each element of the array, that the stencil will be applied to. Note: This map can be very inefficient, since for stencils larger than 1 element in size, the supllied function will be repeatedly applied to the same element. It is better to simply map that function over the source array instead.

  10. rmapStencil :: (a -> b) -> Stencil ix e a -> Stencil ix e b

    massiv Data.Massiv.Array.Stencil

    A covariant map over the right most type argument. In other words the usual fmap from Functor:

    fmap == rmapStencil
    

Page 568 of many | Previous | Next