let
apply (x, b) =
let
lookup y =
if
Term
.eq x y
then
b
else
y
in
map lookup