summaryrefslogtreecommitdiff
path: root/demo/tcSum.ur
diff options
context:
space:
mode:
Diffstat (limited to 'demo/tcSum.ur')
-rw-r--r--demo/tcSum.ur8
1 files changed, 4 insertions, 4 deletions
diff --git a/demo/tcSum.ur b/demo/tcSum.ur
index 53679116..e3340021 100644
--- a/demo/tcSum.ur
+++ b/demo/tcSum.ur
@@ -1,9 +1,9 @@
-fun sum (t ::: Type) (_ : num t) (fs ::: {Unit}) (x : $(mapUT t fs)) =
+fun sum (t ::: Type) (_ : num t) (fs ::: {Unit}) (fl : folder fs) (x : $(mapUT t fs)) =
foldUR [t] [fn _ => t]
(fn (nm :: Name) (rest :: {Unit}) [[nm] ~ rest] n acc => n + acc)
- zero [fs] x
+ zero [fs] fl x
fun main () = return <xml><body>
- {[sum {A = 0, B = 1}]}<br/>
- {[sum {C = 2.1, D = 3.2, E = 4.3}]}
+ {[sum (Folder.cons [#A] [()] ! (Folder.cons [#B] [()] ! Folder.nil)) {A = 0, B = 1}]}<br/>
+ {[sum (Folder.cons [#D] [()] ! (Folder.cons [#C] [()] ! (Folder.cons [#E] [()] ! Folder.nil))) {C = 2.1, D = 3.2, E = 4.3}]}
</body></xml>