added make function
authorhaftmann
Mon, 19 Sep 2005 16:42:11 +0200
changeset 17487 940713ba9d2b
parent 17486 d691bf893d9f
child 17488 67376a311a2b
added make function
src/Pure/General/alist.ML
--- a/src/Pure/General/alist.ML	Mon Sep 19 16:39:27 2005 +0200
+++ b/src/Pure/General/alist.ML	Mon Sep 19 16:42:11 2005 +0200
@@ -19,6 +19,7 @@
     -> ('b * 'c) list -> ('b * 'c) list
   val map_entry: ('a * 'b -> bool) -> 'a -> ('c -> 'c)
     -> ('b * 'c) list -> ('b * 'c) list
+  val make: ('a -> 'b) -> 'a list -> ('a * 'b) list
 end;
 
 structure AList: ALIST =
@@ -58,4 +59,8 @@
       else x :: mapp xs
   in if defined eq xs key' then mapp xs else xs end;
 
+fun make keyfun =
+  let fun keypair x = (x, keyfun x)
+  in map keypair end;
+
 end;