diff options
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 1ba33d8e..0aa07a2d 100644 --- a/lib/ur/option.ur +++ b/lib/ur/option.ur @@ -38,3 +38,8 @@ fun bind [a] [b] f x = case x of None => None | Some y => f y + +fun get [a] (x : a) (o : option a) = + case o of + None => x + | Some v => v |