Hoogle Search

Within LTS Haskell 24.6 (ghc-9.10.2)

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

  1. mapAccumROf :: LensLike (Backwards (State acc)) s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)

    lens Control.Lens.Combinators

    This generalizes mapAccumR to an arbitrary Traversal.

    mapAccumRmapAccumROf traverse
    
    mapAccumROf accumulates State from right to left.
    mapAccumROf :: Iso s t a b       -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
    mapAccumROf :: Lens s t a b      -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
    mapAccumROf :: Traversal s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
    
    mapAccumROf :: LensLike (Backwards (State acc)) s t a b -> (acc -> a -> (acc, b)) -> acc -> s -> (acc, t)
    

  2. mapEq :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2) f . AnEquality s t a b -> f s -> f a

    lens Control.Lens.Combinators

    We can use Equality to do substitution into anything.

  3. mapMOf :: LensLike (WrappedMonad m) s t a b -> (a -> m b) -> s -> m t

    lens Control.Lens.Combinators

    Map each element of a structure targeted by a Lens to a monadic action, evaluate these actions from left to right, and collect the results.

    >>> mapMOf both (\x -> [x, x + 1]) (1,3)
    [(1,3),(1,4),(2,3),(2,4)]
    
    mapMmapMOf traverse
    imapMOf l ≡ forM l . Indexed
    
    mapMOf :: Monad m => Iso s t a b       -> (a -> m b) -> s -> m t
    mapMOf :: Monad m => Lens s t a b      -> (a -> m b) -> s -> m t
    mapMOf :: Monad m => Traversal s t a b -> (a -> m b) -> s -> m t
    

  4. mapMOf_ :: Monad m => Getting (Sequenced r m) s a -> (a -> m r) -> s -> m ()

    lens Control.Lens.Combinators

    Map each target of a Fold on a structure to a monadic action, evaluate these actions from left to right, and ignore the results.

    >>> mapMOf_ both putStrLn ("hello","world")
    hello
    world
    
    mapM_mapMOf_ folded
    
    mapMOf_ :: Monad m => Getter s a     -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Fold s a       -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Lens' s a      -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Iso' s a       -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Traversal' s a -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Prism' s a     -> (a -> m r) -> s -> m ()
    

  5. mapOf :: ASetter s t a b -> (a -> b) -> s -> t

    lens Control.Lens.Combinators

    Deprecated: Use over

  6. mapped :: forall (f :: Type -> Type) a b . Functor f => Setter (f a) (f b) a b

    lens Control.Lens.Combinators

    This Setter can be used to map over all of the values in a Functor.

    fmapover mapped
    fmapDefaultover traverse
    (<$) ≡ set mapped
    
    >>> over mapped f [a,b,c]
    [f a,f b,f c]
    
    >>> over mapped (+1) [1,2,3]
    [2,3,4]
    
    >>> set mapped x [a,b,c]
    [x,x,x]
    
    >>> [[a,b],[c]] & mapped.mapped +~ x
    [[a + x,b + x],[c + x]]
    
    >>> over (mapped._2) length [("hello","world"),("leaders","!!!")]
    [("hello",5),("leaders",3)]
    
    mapped :: Functor f => Setter (f a) (f b) a b
    
    If you want an IndexPreservingSetter use setting fmap.

  7. mapping :: forall (f :: Type -> Type) (g :: Type -> Type) s t a b . (Functor f, Functor g) => AnIso s t a b -> Iso (f s) (g t) (f a) (g b)

    lens Control.Lens.Combinators

    This can be used to lift any Iso into an arbitrary Functor.

  8. mappingNamer :: (String -> [String]) -> FieldNamer

    lens Control.Lens.Combinators

    Create a FieldNamer from a mapping function. If the function returns [], it creates no lens for the field.

  9. mapEq :: forall k1 k2 (s :: k1) (t :: k2) (a :: k1) (b :: k2) f . AnEquality s t a b -> f s -> f a

    lens Control.Lens.Equality

    We can use Equality to do substitution into anything.

  10. mapMOf_ :: Monad m => Getting (Sequenced r m) s a -> (a -> m r) -> s -> m ()

    lens Control.Lens.Fold

    Map each target of a Fold on a structure to a monadic action, evaluate these actions from left to right, and ignore the results.

    >>> mapMOf_ both putStrLn ("hello","world")
    hello
    world
    
    mapM_mapMOf_ folded
    
    mapMOf_ :: Monad m => Getter s a     -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Fold s a       -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Lens' s a      -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Iso' s a       -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Traversal' s a -> (a -> m r) -> s -> m ()
    mapMOf_ :: Monad m => Prism' s a     -> (a -> m r) -> s -> m ()
    

Page 73 of many | Previous | Next