diff options
author | Benjamin Barenblat <benjamin@barenblat.name> | 2017-07-23 08:41:33 -0400 |
---|---|---|
committer | Benjamin Barenblat <benjamin@barenblat.name> | 2017-07-23 08:41:33 -0400 |
commit | 88fa6f57be4b520e2a01dd476d249e91ba7f262e (patch) | |
tree | 491d3b13813610943c60460d3e178d3a73916346 /lib/ur/option.ur | |
parent | 6145d9df05f442e29dfa96a0b8e15ffcc2d683dd (diff) | |
parent | f814fd699dc707e810c996062370ee787863d926 (diff) |
Merge branch 'upstream' into dfsg_clean20170720+dfsg
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 |