summaryrefslogtreecommitdiff
path: root/lib/ur/listPair.ur
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 18:13:09 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-05-14 18:13:09 -0400
commit757f1700cc23e0d8737a5e2f81d4b065420dce94 (patch)
tree87cfafea0f563a41839fe248cd4de81e8a8efed1 /lib/ur/listPair.ur
parentdf3de8503f41b7f317167273e636cd722ba31bc1 (diff)
Fix nasty bugs with longjmp() looping for uw_set_input(); and bad variable indexes for nested JavaScript in jscomp
Diffstat (limited to 'lib/ur/listPair.ur')
-rw-r--r--lib/ur/listPair.ur10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/ur/listPair.ur b/lib/ur/listPair.ur
new file mode 100644
index 00000000..9a56f75a
--- /dev/null
+++ b/lib/ur/listPair.ur
@@ -0,0 +1,10 @@
+fun mapX (a ::: Type) (b ::: Type) (ctx ::: {Unit}) f =
+ let
+ fun mapX' ls1 ls2 =
+ case (ls1, ls2) of
+ ([], []) => <xml/>
+ | (x1 :: ls1, x2 :: ls2) => <xml>{f x1 x2}{mapX' ls1 ls2}</xml>
+ | _ => error <xml>ListPair.mapX: Unequal list lengths</xml>
+ in
+ mapX'
+ end