aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2024-12-10 14:36:58 +0000
committerLouis Pilfold <louis@lpil.uk>2024-12-10 14:36:58 +0000
commitf15d41b5087d286b4862e2d5dea5382961daef55 (patch)
treee130ddc91dec73c8839e603a5fbebd5aef9d0f96 /src
parent370a060299cc9aeca4b37c3a36ce392055599815 (diff)
downloadgleam_stdlib-f15d41b5087d286b4862e2d5dea5382961daef55.tar.gz
gleam_stdlib-f15d41b5087d286b4862e2d5dea5382961daef55.zip
v0.47.0v0.47.0
Diffstat (limited to 'src')
-rw-r--r--src/gleam/bool.gleam27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/gleam/bool.gleam b/src/gleam/bool.gleam
index ced8005..6c14d68 100644
--- a/src/gleam/bool.gleam
+++ b/src/gleam/bool.gleam
@@ -192,17 +192,7 @@ pub fn exclusive_nor(a: Bool, b: Bool) -> Bool {
a == b
}
-/// Compares two bools and returns the first value's `Order` to the second.
-///
-/// ## Examples
-///
-/// ```gleam
-/// import gleam/order
-///
-/// compare(True, False)
-/// // -> order.Gt
-/// ```
-///
+@deprecated("Please use a case expression to get the behaviour you desire")
pub fn compare(a: Bool, with b: Bool) -> Order {
case a, b {
True, True -> order.Eq
@@ -212,20 +202,7 @@ pub fn compare(a: Bool, with b: Bool) -> Order {
}
}
-/// Returns a numeric representation of the given bool.
-///
-/// ## Examples
-///
-/// ```gleam
-/// to_int(True)
-/// // -> 1
-/// ```
-///
-/// ```gleam
-/// to_int(False)
-/// // -> 0
-/// ```
-///
+@deprecated("Please use a case expression to get the behaviour you desire")
pub fn to_int(bool: Bool) -> Int {
case bool {
False -> 0