diff options
Diffstat (limited to 'demo/sum.ur')
-rw-r--r-- | demo/sum.ur | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/demo/sum.ur b/demo/sum.ur index 96a45891..22a21d8b 100644 --- a/demo/sum.ur +++ b/demo/sum.ur @@ -1,9 +1,9 @@ -fun sum (fs :: {Unit}) (x : $(mapUT int fs)) = +fun sum (fs ::: {Unit}) (x : $(mapUT int fs)) = foldUR [int] [fn _ => int] (fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] n acc => n + acc) 0 [fs] x fun main () = return <xml><body> - {[sum [[A, B]] {A = 0, B = 1}]}<br/> - {[sum [[C, D, E]] {C = 2, D = 3, E = 4}]} + {[sum {A = 0, B = 1}]}<br/> + {[sum {C = 2, D = 3, E = 4}]} </body></xml> |