summaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 19:31:11 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2008-10-21 19:31:11 -0400
commit29ee4365f5e19e5eccfa57252cca0bd0f0600ba9 (patch)
tree92c48b30a7960f6c43da6de37013afd0b7f9af5a /demo
parent17b3f5af99c07d7361fb99124412aff1768cfe13 (diff)
Infering sum rows
Diffstat (limited to 'demo')
-rw-r--r--demo/sum.ur6
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>