replace function
Proved that "replace x y (rev zs) = rev (replace x y zs)"