:: a -> (a -> b) -> b -package:protolude -package:vivid package:flow

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)