aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLouis Pilfold <louis@lpil.uk>2019-03-15 14:50:11 +0000
committerLouis Pilfold <louis@lpil.uk>2019-03-15 14:54:02 +0000
commitd613e26ebd67b704ab58c28cc559ee01ae03b547 (patch)
tree96e484695221b0a39dee2ffc51aa0c0b7249d87e /src
parent1ce9a14ba69c593bb40998a5a49d3f066a4aa07a (diff)
downloadgleam_stdlib-d613e26ebd67b704ab58c28cc559ee01ae03b547.tar.gz
gleam_stdlib-d613e26ebd67b704ab58c28cc559ee01ae03b547.zip
Erase directly called capture funs
Diffstat (limited to 'src')
-rw-r--r--src/bool.gleam24
-rw-r--r--src/result.gleam2
2 files changed, 13 insertions, 13 deletions
diff --git a/src/bool.gleam b/src/bool.gleam
index 84e5f6c..89d39f0 100644
--- a/src/bool.gleam
+++ b/src/bool.gleam
@@ -1,20 +1,20 @@
import expect
import order
-// pub fn not(bool) {
-// case bool {
-// | True -> False
-// | False -> True
-// }
-// }
+pub fn negate(bool) {
+ case bool {
+ | True -> False
+ | False -> True
+ }
+}
-// test not {
-// not(True)
-// |> expect:false
+test negate {
+ negate(True)
+ |> expect:false
-// not(False)
-// |> expect:true
-// }
+ negate(False)
+ |> expect:true
+}
// pub fn compare(a, b) {
// case {a, b} {
diff --git a/src/result.gleam b/src/result.gleam
index 1e4a0be..113925e 100644
--- a/src/result.gleam
+++ b/src/result.gleam
@@ -111,7 +111,7 @@ test flat_map {
|> expect:equal(_, Ok(2))
Ok(1)
- |> flat_map(_, fn(unused) { Error(1) })
+ |> flat_map(_, fn(_) { Error(1) })
|> expect:equal(_, Error(1))
}