Mercurial > urweb
diff demo/sum.ur @ 643:aa2290c32ce2
Avoid any JavaScript when pages don't need it; update demo prose
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 10 Mar 2009 10:44:26 -0400 |
parents | 03ab853c8e4b |
children | 669ac5e9a69e |
line wrap: on
line diff
--- a/demo/sum.ur Sun Mar 08 20:34:21 2009 -0400 +++ b/demo/sum.ur Tue Mar 10 10:44:26 2009 -0400 @@ -1,4 +1,4 @@ -fun sum (fs ::: {Unit}) (fl : folder fs) (x : $(mapUT 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) 0 [fs] fl x