diff options
Diffstat (limited to 'lib/ur/list.ur')
-rw-r--r-- | lib/ur/list.ur | 10 |
1 files changed, 10 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 |