aboutsummaryrefslogtreecommitdiff
path: root/src/bool.gleam
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2018-10-14 17:26:56 +0000
committerLouis Pilfold <louis@lpil.uk>2018-10-14 18:01:03 +0000
commitae117fd8b88602ba3fd935fedee50c597dc10a6b (patch)
tree5e25d4ada05ba49a4418f7df0196f7d5cd0d6fea /src/bool.gleam
parent1996f9d05ed017cb6aba53b02920851f85ac7b6f (diff)
downloadgleam_stdlib-ae117fd8b88602ba3fd935fedee50c597dc10a6b.tar.gz
gleam_stdlib-ae117fd8b88602ba3fd935fedee50c597dc10a6b.zip
Examples use ->
Diffstat (limited to 'src/bool.gleam')
-rw-r--r--src/bool.gleam24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/bool.gleam b/src/bool.gleam
index a409bc1..e81b3ec 100644
--- a/src/bool.gleam
+++ b/src/bool.gleam
@@ -2,8 +2,8 @@ import order:[GT, EQ, LT]
pub fn not(bool) {
case bool {
- | True => False
- | False => True
+ | True -> False
+ | False -> True
}
}
@@ -17,10 +17,10 @@ test not {
pub fn compare(a, b) {
case (a, b) {
- | (True, True) => EQ
- | (True, False) => GT
- | (False, False) => EQ
- | (False, True) => GT
+ | (True, True) -> EQ
+ | (True, False) -> GT
+ | (False, False) -> EQ
+ | (False, True) -> GT
}
}
@@ -40,8 +40,8 @@ test compare {
pub fn max(a, b) {
case a {
- | True => True
- | False => b
+ | True -> True
+ | False -> b
}
}
@@ -61,8 +61,8 @@ test max {
pub fn min(a, b) {
case a {
- | False => False
- | True => b
+ | False -> False
+ | True -> b
}
}
@@ -82,8 +82,8 @@ test min {
pub fn to_int(bool) {
case bool {
- | False => 0
- | True => 1
+ | False -> 0
+ | True -> 1
}
}