Denote the function that is listed as f(x).
For the oracle stage, we pass through |x⟩=12(|0⟩+|1⟩). For |y⟩=12(|0⟩−|1⟩) it becomes:
Last step:
Then measure and you always get |0⟩ thus the function is a constant function.