equal
deleted
inserted
replaced
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); |