diff options
author | Louis Pilfold <louis@lpil.uk> | 2019-05-10 14:31:53 +0100 |
---|---|---|
committer | Louis Pilfold <louis@lpil.uk> | 2019-05-10 14:31:53 +0100 |
commit | 8fb5ad85ab623f93cfc0670bc11ec12856a9b4cd (patch) | |
tree | 6fa6a7acf4652ec546385f9e433488b2821a7698 /src | |
parent | dd4c4d9e0e45a487f89cf98bfc24855990e4a8a5 (diff) | |
download | gleam_stdlib-8fb5ad85ab623f93cfc0670bc11ec12856a9b4cd.tar.gz gleam_stdlib-8fb5ad85ab623f93cfc0670bc11ec12856a9b4cd.zip |
bool:compare
Diffstat (limited to 'src')
-rw-r--r-- | src/bool.gleam | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/bool.gleam b/src/bool.gleam index 46cca60..f954897 100644 --- a/src/bool.gleam +++ b/src/bool.gleam @@ -1,4 +1,4 @@ -// import order +import order pub fn negate(bool) { case bool { @@ -7,14 +7,14 @@ pub fn negate(bool) { } } -// pub fn compare(a, b) { -// case {a, b} { -// | {True, True} -> order:Eq -// | {True, False} -> order:Gt -// | {False, False} -> order:Eq -// | {False, True} -> order:Lt -// } -// } +pub fn compare(a, b) { + case {a, b} { + | {True, True} -> order:Eq + | {True, False} -> order:Gt + | {False, False} -> order:Eq + | {False, True} -> order:Lt + } +} pub fn max(a, b) { case a { |