The new expression to be inserted into the list.
The expression in the list to be replaced.
A list.
nreplace traverses the list, replacing any element which is eq to old_s_exp with new_s_exp. nreplace_equal uses equal as its comparison function.
Gamma> R = list (#f, nil, 5, #ftg);
(f nil 5 ftg)
Gamma> nreplace(#h, #ftg, R);
(f nil 5 h)
Gamma> x = list(1,2,3,1,6,7);
(1 2 3 1 6 7)
Gamma> nreplace(4,1,x);
(1 2 3 1 6 7)
Gamma> nreplace_equal(4,1,x);
(4 2 3 4 6 7)
Gamma> x;
(4 2 3 4 6 7)
Gamma>