aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Saxton <peterhsaxton@gmail.com>2020-04-28 12:27:54 +0100
committerGitHub <noreply@github.com>2020-04-28 12:27:54 +0100
commit8a8cfc62d6d0088cc4f8cd0c2d3def4bb0576d57 (patch)
tree17c8661273d8b0854e2752e87ee413553dd15bf1
parent0a9d01dee37a02eb205d79eb98c1190dc2097af0 (diff)
downloadgleam_stdlib-8a8cfc62d6d0088cc4f8cd0c2d3def4bb0576d57.tar.gz
gleam_stdlib-8a8cfc62d6d0088cc4f8cd0c2d3def4bb0576d57.zip
Fix doc for "then function" (#33)
-rw-r--r--src/gleam/result.gleam4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gleam/result.gleam b/src/gleam/result.gleam
index fac116c..69dfb8b 100644
--- a/src/gleam/result.gleam
+++ b/src/gleam/result.gleam
@@ -68,7 +68,9 @@ pub fn flatten(result: Result(Result(a, e), e)) -> Result(a, e) {
}
}
-/// An alias of `map`
+/// Executes the function `apply` on inner value when Result is Ok, will noop
+/// if it is Error
+/// Equivalent to `map` followed by `flatten`.
///
pub fn then(
result: Result(a, e),