src/Pure/General/table.ML
changeset 19482 9f11af8f7ef9
parent 19073 fce515f7759c
child 19506 980a2edf9e82
equal deleted inserted replaced
19481:a6205c6203ea 19482:9f11af8f7ef9
   377 fun remove_list eq (key, x) tab =
   377 fun remove_list eq (key, x) tab =
   378   map_entry key (fn xs => (case Library.remove eq x xs of [] => raise UNDEF key | ys => ys)) tab
   378   map_entry key (fn xs => (case Library.remove eq x xs of [] => raise UNDEF key | ys => ys)) tab
   379   handle UNDEF _ => delete key tab;
   379   handle UNDEF _ => delete key tab;
   380 
   380 
   381 fun make_list args = fold_rev update_list args empty;
   381 fun make_list args = fold_rev update_list args empty;
   382 fun dest_list tab = List.concat (map (fn (key, xs) => map (pair key) xs) (dest tab));
   382 fun dest_list tab = maps (fn (key, xs) => map (pair key) xs) (dest tab);
   383 fun merge_list eq = join (fn _ => Library.merge eq);
   383 fun merge_list eq = join (fn _ => Library.merge eq);
   384 
   384 
   385 
   385 
   386 (*final declarations of this structure!*)
   386 (*final declarations of this structure!*)
   387 fun map f = map_table (K f);
   387 fun map f = map_table (K f);