Mercurial > urweb
diff demo/tcSum.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/tcSum.ur Sun Mar 08 20:34:21 2009 -0400 +++ b/demo/tcSum.ur Tue Mar 10 10:44:26 2009 -0400 @@ -1,4 +1,4 @@ -fun sum (t ::: Type) (_ : num t) (fs ::: {Unit}) (fl : folder fs) (x : $(mapUT t fs)) = +fun sum (t ::: Type) (_ : num t) (fs ::: {Unit}) (fl : folder fs) (x : $(mapU t fs)) = foldUR [t] [fn _ => t] (fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] n acc => n + acc) zero [fs] fl x