Lines Matching refs:value
4 Association lists -- lists of (key, value) pairs.
17 | find ((key', value)::xs) i =
34 | lookup eq ((key, value)::xs) key' =
35 if eq (key', key) then SOME value
39 | defined eq ((key, value)::xs) key' =
42 fun update eq (x as (key, value)) =
45 fun default eq (key, value) xs =
46 if defined eq xs key then xs else (key, value) :: xs;
52 map_index eq key I (fn (key, value) => cons (key, f value));
54 fun map_default eq (key, value) f =
55 map_index eq key (cons (key, f value)) (fn (key, value) => cons (key, f value));
60 fun mapp 0 ((x as (key, value))::xs) =
61 let val (r, value') = f value
62 in (SOME r, (key, value') :: xs) end
73 fun add (y as (key, value)) xs =
76 | SOME value' => update eq (key, f key (value', value)) xs);
87 | find eq ((key, value) :: xs) value' =
89 val values = find eq xs value';
90 in if eq (value', value) then key :: values else values end;