diff options
author | Giacomo Cavalieri <giacomo.cavalieri@icloud.com> | 2024-04-08 13:38:33 +0200 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2024-04-08 12:55:10 +0100 |
commit | 11ff0aa8e0b5b37d1a4cc4ed0b074495b5e51d5f (patch) | |
tree | db3341345b6bb18ec319991be1a8e06cdfca26e4 | |
parent | d40649249ef2c294054ff741a0a2864bf4850968 (diff) | |
download | gleam_stdlib-11ff0aa8e0b5b37d1a4cc4ed0b074495b5e51d5f.tar.gz gleam_stdlib-11ff0aa8e0b5b37d1a4cc4ed0b074495b5e51d5f.zip |
Deprecate `bool.min` and `bool.max`
-rw-r--r-- | CHANGELOG.md | 4 | ||||
-rw-r--r-- | src/gleam/bool.gleam | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index a756cc7..574f0c8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ - `list.LengthMismatch` has been removed. - The mistakenly public `bit_array.do_inspect` function has been removed. - Fixed the `dynamic.classification` function for bools. +- The `min` function in the `bool` module has been deprecated in favour of + `bool.and`. +- The `max` function in the `bool` module has been deprecated in favour of + `bool.or`. ## v0.36.0 - 2024-02-26 diff --git a/src/gleam/bool.gleam b/src/gleam/bool.gleam index 0671c03..4192ac5 100644 --- a/src/gleam/bool.gleam +++ b/src/gleam/bool.gleam @@ -253,6 +253,7 @@ pub fn compare(a: Bool, with b: Bool) -> Order { /// // -> False /// ``` /// +@deprecated("Use the `bool.or` function instead") pub fn max(a: Bool, b: Bool) -> Bool { case a { True -> True @@ -279,6 +280,7 @@ pub fn max(a: Bool, b: Bool) -> Bool { /// // -> False /// ``` /// +@deprecated("Use the `bool.and` function instead") pub fn min(a: Bool, b: Bool) -> Bool { case a { False -> False |