aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinoas <mail@inoas.com>2023-04-17 17:36:25 +0000
committerLouis Pilfold <louis@lpil.uk>2023-04-19 08:21:15 +0100
commit242f80a4cf2077c22b8255ff26972f662d160f11 (patch)
treeebe78cd74916f5e718cde708347f5c576105a3fa
parent1b549a6125299bcb12359f618d12e0ef179d0faa (diff)
downloadgleam_stdlib-242f80a4cf2077c22b8255ff26972f662d160f11.tar.gz
gleam_stdlib-242f80a4cf2077c22b8255ff26972f662d160f11.zip
Update result.gleam
-rw-r--r--src/gleam/result.gleam5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gleam/result.gleam b/src/gleam/result.gleam
index 402886b..4e99f13 100644
--- a/src/gleam/result.gleam
+++ b/src/gleam/result.gleam
@@ -168,7 +168,10 @@ pub fn try(
/// An alias for `try`. See the documentation for that function for more information.
///
-pub fn then(result, fun) {
+pub fn then(
+ result: Result(a, e),
+ apply fun: fn(a) -> Result(b, e),
+)
try(result, fun)
}