File tree 2 files changed +8
-2
lines changed
2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ Bugfixes:
12
12
13
13
Other improvements:
14
14
- Changed ` unit ` 's FFI representation from ` {} ` to ` undefined ` (#267 by @JordanMartinez )
15
+ - Clarify docs for ` flip ` (#271 by @JordanMartinez )
15
16
16
17
## [ v5.0.1] ( https://github.com/purescript/purescript-prelude/releases/tag/v5.0.1 ) - 2021-05-11
17
18
Original file line number Diff line number Diff line change @@ -13,10 +13,15 @@ import Data.Boolean (otherwise)
13
13
import Data.Ord ((<=))
14
14
import Data.Ring ((-))
15
15
16
- -- | Flips the order of the arguments to a function of two arguments.
16
+ -- | Given a function that takes two arguments, applies the arguments
17
+ -- | to the function in a swapped order.
17
18
-- |
18
19
-- | ```purescript
19
- -- | flip const 1 2 = const 2 1 = 2
20
+ -- | flip append "1" "2" == append "2" "1" == "21"
21
+ -- |
22
+ -- | const 1 "two" == 1
23
+ -- |
24
+ -- | flip const 1 "two" == const "two" 1 == "two"
20
25
-- | ```
21
26
flip :: forall a b c . (a -> b -> c ) -> b -> a -> c
22
27
flip f b a = f a b
You can’t perform that action at this time.
0 commit comments