aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/ur/list.ur10
-rw-r--r--lib/ur/list.urs1
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/ur/list.ur b/lib/ur/list.ur
index 5310c810..ecec2bec 100644
--- a/lib/ur/list.ur
+++ b/lib/ur/list.ur
@@ -29,3 +29,13 @@ fun mp (a ::: Type) (b ::: Type) f =
in
mp' []
end
+
+fun mapX (a ::: Type) (ctx ::: {Unit}) f =
+ let
+ fun mapX' ls =
+ case ls of
+ [] => <xml/>
+ | x :: ls => <xml>{f x}{mapX' ls}</xml>
+ in
+ mapX'
+ end
diff --git a/lib/ur/list.urs b/lib/ur/list.urs
index 879648ea..e9e097d4 100644
--- a/lib/ur/list.urs
+++ b/lib/ur/list.urs
@@ -6,3 +6,4 @@ val rev : a ::: Type -> t a -> t a
val mp : a ::: Type -> b ::: Type -> (a -> b) -> t a -> t b
+val mapX : a ::: Type -> ctx ::: {Unit} -> (a -> xml ctx [] []) -> t a -> xml ctx [] []