flip
lib.trivial.flip
Docs pulled from | This Revision | about 1 hour ago
Flip the order of the arguments of a binary function.
Inputs
f-
1. Function argument
a-
2. Function argument
b-
3. Function argument
Type
flip :: (a -> b -> c) -> (b -> a -> c)
Examples
lib.trivial.flip usage example
flip concat [1] [2]
=> [ 2 1 ]
Noogle detected
Implementation
The following is the current implementation of this function.
flip =
f: a: b:
f b a;