Find a continuous, bijective function from $(0,1)$ onto $(0,1]$.
My attempt: Any such maps exists. This is my guess.
Suppose if $f$ is a bijection from $(0,1)$ onto $(0,1]$, then there exist $x\in (0,1)$ such that $f(x) = 1$. Now choose $0<a<x<b<1$ such that $f(a)< f(x)=1$ and $f(b)<f(x) = 1$ otherwise if $f(a)= f(x)=1$, then it would contradict that $f$ is injective.
Now I cannot proceed further. Please help.