Skip to content

Commit 6a9f39d

Browse files
giacomocavalierilpil
authored andcommitted
deprecate flip
1 parent 7914051 commit 6a9f39d

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Unreleased
44

55
- The performance of `dict.is_empty` has been improved.
6+
- The `flip` function in the `function` module has been deprecated.
67

78
## v0.54.0 - 2025-02-04
89

src/gleam/function.gleam

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
/// Takes a function that takes two arguments and returns a new function that
22
/// takes the same two arguments, but in reverse order.
33
///
4+
@deprecated("This function has been deprecated. Use a function literal instead: `fn(a, b) { fun(b, a) }`")
45
pub fn flip(fun: fn(a, b) -> c) -> fn(b, a) -> c {
56
fn(b, a) { fun(a, b) }
67
}

0 commit comments

Comments
 (0)