diff options
author | Benjamin Barenblat <bbaren@mit.edu> | 2017-07-23 08:45:59 -0400 |
---|---|---|
committer | Benjamin Barenblat <bbaren@mit.edu> | 2017-07-23 08:45:59 -0400 |
commit | 8c58ba2e1db6e97ca1f18fd9ca52ffead53e4a4f (patch) | |
tree | 491d3b13813610943c60460d3e178d3a73916346 /lib/ur/option.ur | |
parent | 6145d9df05f442e29dfa96a0b8e15ffcc2d683dd (diff) | |
parent | f814fd699dc707e810c996062370ee787863d926 (diff) |
Merge branch 'upstream' into dfsg_clean
Diffstat (limited to 'lib/ur/option.ur')
-rw-r--r-- | lib/ur/option.ur | 5 |
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 |