:: a -> (a -> b) -> b

& 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 $.
>>> 5 & (+1) & show
"6"
& 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 $.
>>> 5 & (+1) & show
"6"
& is a reverse application operator
Reverse function application which binds tighter than <$> and <*>. Useful for refining grammar specification.
<*> monoidalFieldAla "extensions"           (alaList' FSep MQuoted)       oldExtensions
^^^ deprecatedSince [1,12] "Please use 'default-extensions' or 'other-extensions' fields."
Postfix function application, for conveniently applying attributes. Unlike ($), (#) has a high precedence (8), so d # foo # bar can be combined with other things using operators like (|||) or (<>) without needing parentheses.
Flipped version of '($)'.
Left-associative apply operator. Read as "apply forward" or "pipe into". Use this to create long chains of computation that suggest which direction things move in.
>>> 3 |> succ |> recip |> negate
-0.25
Or use it anywhere you would use (&).
\ x -> (x |> f) == f x
\ x -> (x |> f |> g) == g (f x)
Function application. This function usually isn't necessary, but it can be more readable than some alternatives when used with higher-order functions like map.
>>> map (apply 2) [succ, recip, negate]
[3.0,0.5,-2.0]
In general you should prefer using an explicit lambda or operator section.
>>> map (\ f -> 2 |> f) [succ, recip, negate]
[3.0,0.5,-2.0]

>>> map (2 |>) [succ, recip, negate]
[3.0,0.5,-2.0]

>>> map (<| 2) [succ, recip, negate]
[3.0,0.5,-2.0]
\ x -> apply x f == f x
Left-associative apply' operator. Read as "strict apply forward" or "strict pipe into". Use this to create long chains of computation that suggest which direction things move in.
>>> 3 !> succ !> recip !> negate
-0.25
The difference between this and (|>) is that this evaluates its argument before passing it to the function.
>>> undefined |> const True
True

>>> undefined !> const True
*** Exception: Prelude.undefined
...
\ x -> (x !> f) == seq x (f x)
\ x -> (x !> f !> g) == let y = seq x (f x) in seq y (g y)
Strict function application. This function usually isn't necessary, but it can be more readable than some alternatives when used with higher-order functions like map.
>>> map (apply' 2) [succ, recip, negate]
[3.0,0.5,-2.0]
The different between this and apply is that this evaluates its argument before passing it to the function.
>>> apply undefined (const True)
True

>>> apply' undefined (const True)
*** Exception: Prelude.undefined
...
In general you should prefer using an explicit lambda or operator section.
>>> map (\ f -> 2 !> f) [succ, recip, negate]
[3.0,0.5,-2.0]

>>> map (2 !>) [succ, recip, negate]
[3.0,0.5,-2.0]

>>> map (<! 2) [succ, recip, negate]
[3.0,0.5,-2.0]
\ x -> apply' x f == seq x (f x)
Reverse function application. Allows convenient notation for setting properties. Example usage.
mkElement "div"
# set style     [("color","#CCAABB")]
# set draggable True
# set children  otherElements
Operator for postfix notation (same as Data.Function.(&))
>>> 255 .@hex
"0x0000_0000_0000_00ff"

>>> 0xf1 .@bin
"0b1111_0001"

>>> 2^12 .@dec
"4096"

>>> 4 * giga .@pos1
[32]
0x0 .@color (bits 31 24)
0b0000_0000_0000_0000_0000_0000_0000_0000_1111_1111_0000_0000_0000_0000_0000_0000
^^^^ ^^^^
& 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 $.
Saying x |> f is exactly the same as f x. It is called the “pipe” operator because it lets you write “pipelined” code. For example, say we have a sanitize function for turning user input into integers:
-- BEFORE
sanitize :: String -> Maybe Int
sanitize input =
String.toInt (String.trim input)
We can rewrite it like this:
-- AFTER
sanitize :: String -> Maybe Int
sanitize input =
input
|> String.trim
|> String.toInt
Totally equivalent! I recommend trying to rewrite code that uses x |> f into code like f x until there are no pipes left. That can help you build your intuition. Note: This can be overused! I think folks find it quite neat, but when you have three or four steps, the code often gets clearer if you break out a top-level helper function. Now the transformation has a name. The arguments are named. It has a type annotation. It is much more self-documenting that way! Testing the logic gets easier too. Nice side benefit!
Hang on function application, a.k.a. non-operator version of &.
onApp = (&)
postfix function application (flip ($))
A flipped version of ($).
A flipped version of ($).
An operator that allows you to write C-style ternary conditionals of the form:
p ? t ?? f
Note that parentheses are required in order to chain sequences of conditionals together. This is probably a good thing.
Application operator. This operator is redundant, since ordinary application (f x) means the same as (f $ x). However, $ has low, right-associative binding precedence, so it sometimes allows parentheses to be omitted; for example:
f $ g $ h x  =  f (g (h x))
It is also useful in higher-order situations, such as map ($ 0) xs, or zipWith ($) fs xs. Note that ($) is levity-polymorphic in its result type, so that foo $ True where foo :: Bool -> Int# is well-typed.
Strict (call-by-value) application operator. It takes a function and an argument, evaluates the argument to weak head normal form (WHNF), then calls the function with that value.
The oneShot function can be used to give a hint to the compiler that its argument will be called at most once, which may (or may not) enable certain optimizations. It can be useful to improve the performance of code in continuation passing style. If oneShot is used wrongly, then it may be that computations whose result that would otherwise be shared are re-evaluated every time they are used. Otherwise, the use of oneShot is safe. oneShot is representation polymorphic: the type variables may refer to lifted or unlifted types.