Mercurial > urweb
comparison 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 |
comparison
equal
deleted
inserted
replaced
1067:50dd937c4cb9 | 1068:757dbac0454d |
---|---|
36 | 36 |
37 fun bind [a] [b] f x = | 37 fun bind [a] [b] f x = |
38 case x of | 38 case x of |
39 None => None | 39 None => None |
40 | Some y => f y | 40 | Some y => f y |
41 | |
42 fun get [a] (x : a) (o : option a) = | |
43 case o of | |
44 None => x | |
45 | Some v => v |