added gen_overwrite;
authorwenzelm
Fri Jan 17 18:20:22 1997 +0100 (1997-01-17)
changeset 2522a1a18530c4ac
parent 2521 b7dd670cfe3a
child 2523 0ccea141409b
added gen_overwrite;
src/Pure/library.ML
     1.1 --- a/src/Pure/library.ML	Fri Jan 17 18:19:57 1997 +0100
     1.2 +++ b/src/Pure/library.ML	Fri Jan 17 18:20:22 1997 +0100
     1.3 @@ -611,6 +611,12 @@
     1.4          | over [] = [p]
     1.5    in over al end;
     1.6  
     1.7 +fun gen_overwrite eq (al, p as (key, _)) =
     1.8 +  let fun over ((q as (keyi, _)) :: pairs) =
     1.9 +            if eq (keyi, key) then p :: pairs else q :: (over pairs)
    1.10 +        | over [] = [p]
    1.11 +  in over al end;
    1.12 +
    1.13  
    1.14  
    1.15  (** generic tables **)