Mercurial > urweb
diff tests/pcase.ur @ 244:71bafe66dbe1
Laconic -> Ur
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Sun, 31 Aug 2008 08:32:18 -0400 |
parents | tests/pcase.lac@8221b95cc24c |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/pcase.ur Sun Aug 31 08:32:18 2008 -0400 @@ -0,0 +1,9 @@ +val flip = fn x : int => case x of 0 => 1 | _ => 0 + +val zero = flip 1 +val one = flip 0 + +val flipS = fn x : string => case x of "" => "Hello world!" | _ => "" + +val s1 = flipS "" +val s2 = flipS "Boop"