diff options
author | Louis Pilfold <louis@lpil.uk> | 2020-01-13 21:54:04 +0000 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2020-01-13 22:39:29 +0000 |
commit | 3a64d71ac051f1f6ff76ba4602bc1f5d58430a6d (patch) | |
tree | 024baefeb79961e9136a4163c5052c46995aee49 | |
parent | 4580e7e0e39b73a2208360b47700457bd6afd466 (diff) | |
download | gleam_stdlib-3a64d71ac051f1f6ff76ba4602bc1f5d58430a6d.tar.gz gleam_stdlib-3a64d71ac051f1f6ff76ba4602bc1f5d58430a6d.zip |
Type annotations for gleam/bool
-rw-r--r-- | src/gleam/bool.gleam | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gleam/bool.gleam b/src/gleam/bool.gleam index 815688e..6c77e7a 100644 --- a/src/gleam/bool.gleam +++ b/src/gleam/bool.gleam @@ -1,13 +1,13 @@ -import gleam/order +import gleam/order.{Order} -pub fn negate(bool) { +pub fn negate(bool: Bool) -> Bool { case bool { True -> False False -> True } } -pub fn compare(a, b) { +pub fn compare(a: Bool, b: Bool) -> Order { case a, b { True, True -> order.Eq True, False -> order.Gt @@ -16,21 +16,21 @@ pub fn compare(a, b) { } } -pub fn max(a, b) { +pub fn max(a: Bool, b: Bool) -> Bool { case a { True -> True False -> b } } -pub fn min(a, b) { +pub fn min(a: Bool, b: Bool) -> Bool { case a { False -> False True -> b } } -pub fn to_int(bool) { +pub fn to_int(bool: Bool) -> Int { case bool { False -> 0 True -> 1 |