lens-3.7.6: Lenses, Folds and Traversals

Control.Lens.Combinators

Description

Synopsis

(<$!>) :: Monad m => (a -> b) -> m a -> m bSource

A strict version of (<$>) for monads.

<$>

>>> (+1) <$!> [1,2,3,4] [2,3,4,5]

>>>

(+1) <$!> [1,2,3,4]

(<$!) :: Monad m => b -> m a -> m bSource

A strict version of (<$) for monads.

<$

>>> () <$! [1,2,3,4] [(),(),(),()]

() <$! [1,2,3,4]

(<&>) :: Functor f => f a -> (a -> b) -> f bSource

Infix flipped fmap.

(<&>) = flip fmap

<&>

flip

fmap

(??) :: Functor f => f (a -> b) -> a -> f bSource

This is convenient to flip argument order of composite functions

>>> over _2 ?? ("hello","world") $ length ("hello",5)

over _2 ?? ("hello","world") $ length

>>> over ?? length ?? ("hello","world") $ _2 ("hello",5)

over ?? length ?? ("hello","world") $ _2