aboutsummaryrefslogtreecommitdiffhomepage
path: root/std/Result.bruijn
diff options
context:
space:
mode:
Diffstat (limited to 'std/Result.bruijn')
-rw-r--r--std/Result.bruijn9
1 files changed, 2 insertions, 7 deletions
diff --git a/std/Result.bruijn b/std/Result.bruijn
index 51eabdc..f7e93f0 100644
--- a/std/Result.bruijn
+++ b/std/Result.bruijn
@@ -57,15 +57,10 @@ map-err [[0 ok [err (2 0)]]] ⧗ (a → b) → (Result a) → (Result b)
:test (map-err [[1]] (ok [[0]])) ((ok [[0]]))
:test (map-err [[1]] (err [[0]])) ((err [[[0]]]))
-# applies encapsulated value to given function (if ok)
-apply [[1 0 err]] ⧗ (Result a) → (a → b) → (Result b)
-
-:test (apply (err [[0]]) [ok ([[1]] 0)]) (err [[0]])
-:test (apply (ok [[0]]) [ok ([[1]] 0)]) (ok [[[0]]])
-
pure ok ⧗ a → (Result a)
-bind [[1 0 err]] ⧗ (Result a) → (a → (Result b)) → (Result a)
+# applies encapsulated value to given function (if ok)
+bind [[1 0 err]] ⧗ (Result a) → (a → (Result b)) → (Result b)
…>>=… bind