Most likely you are using the inverse function application operator defined as
(&) :: a -> (a -> b) -> b
a & f = f a
This is just an upside down version ($)
, often used in GUI libraries and other things where it makes sense to “apply” functions and modifiers to existing values.
textbox & onClick foo & enabled
looks better and often easier than
enabled . onClick foo $ textbox
who reads backwards in a way. To find out what you are talking about, you need to start on the right side.
source
share