diff lib/ur/option.ur @ 1068:757dbac0454d

Checked-ness of radio options; Option.get
author Adam Chlipala <adamc@hcoop.net>
date Sat, 12 Dec 2009 11:02:20 -0500
parents 8c37699de273
children a99b743a3087
line wrap: on
line diff
--- a/lib/ur/option.ur	Thu Dec 10 15:46:07 2009 -0500
+++ b/lib/ur/option.ur	Sat Dec 12 11:02:20 2009 -0500
@@ -38,3 +38,8 @@
     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