X-Git-Url: http://git.joshuawise.com/snipe.git/blobdiff_plain/0a24e44d4e9f82f8d3d83de8e58c83c8cf2868b6..6ade8b0a3251e44b34c6bdbbd9403e36d6fd6231:/util/symbol.sml diff --git a/util/symbol.sml b/util/symbol.sml index 77878b4..87a0ab9 100644 --- a/util/symbol.sml +++ b/util/symbol.sml @@ -38,7 +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 table * 'a table -> 'a table + val intersect : ('a * 'a -> 'a) -> 'a table * 'a table -> 'a table (* symbol set -- similar to a () Symbol.table, elements can be removed *) type set @@ -104,7 +104,7 @@ struct fun elems t = Map.listItems t fun elemsi t = Map.listItemsi t fun keys t = Map.listKeys t - fun intersect (t1,t2) = Map.intersectWith (fn (a,_) => a) (t1,t2) + fun intersect binding (t1,t2) = Map.intersectWith binding (t1,t2) fun delimit' [] s = s | delimit' [x] s = s ^ x