comparison 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
comparison
equal deleted inserted replaced
642:4a125bbc602d 643:aa2290c32ce2
1 fun sum (t ::: Type) (_ : num t) (fs ::: {Unit}) (fl : folder fs) (x : $(mapUT t fs)) = 1 fun sum (t ::: Type) (_ : num t) (fs ::: {Unit}) (fl : folder fs) (x : $(mapU t fs)) =
2 foldUR [t] [fn _ => t] 2 foldUR [t] [fn _ => t]
3 (fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] n acc => n + acc) 3 (fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] n acc => n + acc)
4 zero [fs] fl x 4 zero [fs] fl x
5 5
6 fun main () = return <xml><body> 6 fun main () = return <xml><body>