]> Joshua Wise's Git repositories - snipe.git/blobdiff - util/symbol.sml
Initial import of l3c
[snipe.git] / util / symbol.sml
index 590f9be1ce2c45ea7459943ce8ca823a8dcd9ad3..87a0ab9c06b219e7c790cfca146e99f709f0c4eb 100644 (file)
@@ -38,6 +38,7 @@ sig
   val elems : 'a table -> 'a list (* return all the data as a list *)
   val elemsi : 'a table -> (symbol * 'a) list (* return the symbols with the associated data *)
   val keys : 'a table -> symbol list (* just the symbols *)
+  val intersect : ('a * 'a -> 'a) -> 'a table * 'a table -> 'a table
 
   (* symbol set -- similar to a () Symbol.table, elements can be removed *)
   type set
@@ -103,6 +104,7 @@ struct
   fun elems t = Map.listItems t
   fun elemsi t = Map.listItemsi t
   fun keys t = Map.listKeys t
+  fun intersect binding (t1,t2) = Map.intersectWith binding (t1,t2)
 
   fun delimit' [] s = s
     | delimit' [x] s = s ^ x
This page took 0.023953 seconds and 4 git commands to generate.