flip package:relude

flip f takes its (first) two arguments in the reverse order of f.
flip f x y = f y x
flip . flip = id

Examples

>>> flip (++) "hello" "world"
"worldhello"
>>> let (.>) = flip (.) in (+1) .> show $ 5
"6"
Similar to foldl' but takes a function with its arguments flipped.
>>> flipfoldl' (/) 5 [2,3] :: Rational
15 % 2
This function can be useful for constructing containers from lists.