summaryrefslogtreecommitdiff
path: root/lib/ur/option.ur
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ur/option.ur')
-rw-r--r--lib/ur/option.ur5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/ur/option.ur b/lib/ur/option.ur
index 05c50d1f..baa08466 100644
--- a/lib/ur/option.ur
+++ b/lib/ur/option.ur
@@ -40,6 +40,11 @@ fun mp [a] [b] f x =
None => None
| Some y => Some (f y)
+fun app [m] [a] (_ : monad m) (f : a -> m {}) x =
+ case x of
+ None => return ()
+ | Some y => f y
+
fun bind [a] [b] f x =
case x of
None => None