Right-associative
apply' operator. Read as "strict apply
backward" or "strict pipe from". Use this to create long chains of
computation that suggest which direction things move in. You may
prefer this operator over (
!>) for
IO actions since
it puts the last function first.
>>> print <! negate <! recip <! succ <! 3
-0.25
Or use it anywhere you would use (
$!).
The difference between this and (
<|) is that this evaluates
its argument before passing it to the function.
>>> const True <| undefined
True
>>> const True <! undefined
*** Exception: Prelude.undefined
...
Note that (
<!) and (
!>) have the same precedence,
so they cannot be used together.
>>> -- This doesn't work!
>>> -- print <! 3 !> succ !> recip !> negate
\ x -> (f <! x) == seq x (f x)
\ x -> (g <! f <! x) == let y = seq x (f x) in seq y (g y)