more operations;
authorwenzelm
Fri, 05 May 2023 23:50:31 +0200
changeset 77974 93999ffdb9dd
parent 77973 ab6e4085a19d
child 77975 a7ca67369755
more operations;
src/Pure/General/change_table.ML
--- a/src/Pure/General/change_table.ML	Fri May 05 23:48:14 2023 +0200
+++ b/src/Pure/General/change_table.ML	Fri May 05 23:50:31 2023 +0200
@@ -30,6 +30,9 @@
   val map_entry: key -> ('a -> 'a) -> 'a T -> 'a T
   val map_default: key * 'a -> ('a -> 'a) -> 'a T -> 'a T
   val delete_safe: key -> 'a T -> 'a T
+  val insert_list: ('a * 'a -> bool) -> key * 'a -> 'a list T -> 'a list T
+  val remove_list: ('b * 'a -> bool) -> key * 'b -> 'a list T -> 'a list T
+  val update_list: ('a * 'a -> bool) -> key * 'a -> 'a list T -> 'a list T
 end;
 
 functor Change_Table(Key: KEY): CHANGE_TABLE =
@@ -153,7 +156,10 @@
 fun map_default (key, x) f = change_table key (Table.map_default (key, x) f);
 fun delete_safe key        = change_table key (Table.delete_safe key);
 
+fun insert_list eq (key, x) = change_table key (Table.insert_list eq (key, x));
+fun remove_list eq (key, x) = change_table key (Table.remove_list eq (key, x));
+fun update_list eq (key, x) = change_table key (Table.update_list eq (key, x));
+
 end;
 
 structure Change_Table = Change_Table(type key = string val ord = fast_string_ord);
-