aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/ur/list.ur
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ur/list.ur')
-rw-r--r--lib/ur/list.ur7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/ur/list.ur b/lib/ur/list.ur
index d774cc54..3d4134ea 100644
--- a/lib/ur/list.ur
+++ b/lib/ur/list.ur
@@ -217,6 +217,13 @@ fun app [m] (_ : monad m) [a] f =
app'
end
+fun mapQuery [tables ::: {{Type}}] [exps ::: {Type}] [t ::: Type]
+ [tables ~ exps] (q : sql_query tables exps)
+ (f : $(exps ++ map (fn fields :: {Type} => $fields) tables) -> t) =
+ query q
+ (fn fs acc => return (f fs :: acc))
+ []
+
fun assoc [a] [b] (_ : eq a) (x : a) =
let
fun assoc' (ls : list (a * b)) =