Mercurial > urweb
diff demo/sum.ur @ 823:669ac5e9a69e
Demo compiles with pattern-matching-fu
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 28 May 2009 10:35:25 -0400 |
parents | aa2290c32ce2 |
children | 8d3aa6c7cee0 |
line wrap: on
line diff
--- a/demo/sum.ur Thu May 28 10:16:50 2009 -0400 +++ b/demo/sum.ur Thu May 28 10:35:25 2009 -0400 @@ -1,6 +1,6 @@ -fun sum (fs ::: {Unit}) (fl : folder fs) (x : $(mapU int fs)) = +fun sum [fs ::: {Unit}] (fl : folder fs) (x : $(mapU int fs)) = foldUR [int] [fn _ => int] - (fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] n acc => n + acc) + (fn [nm :: Name] [rest :: {Unit}] [[nm] ~ rest] n acc => n + acc) 0 [fs] fl x fun main () = return <xml><body>