| Safe Haskell | Safe-Inferred |
|---|---|
| Language | Haskell2010 |
GHC.Toolchain.Lens
Description
A very simple Lens implementation
Documentation
(%++) :: Lens a [b] -> b -> a -> a Source #
Append b to [b]
Example usage:
@
cc & _ccProgram % _prgFlags %++ "-U__i686"
@
(&) :: a -> (a -> b) -> b infixl 1 Source #
& is a reverse application operator. This provides notational
convenience. Its precedence is one higher than that of the forward
application operator $, which allows & to be nested in $.
This is a version of , where flip idid is specialized from a -> a to (a -> b) -> (a -> b)
which by the associativity of (->) is (a -> b) -> a -> b.
flipping this yields a -> (a -> b) -> b which is the type signature of &
Examples
>>>5 & (+1) & show"6"
>>>sqrt $ [1 / n^2 | n <- [1..1000]] & sum & (*6)3.1406380562059946
Since: base-4.8.0.0