If $f(x)=a$ for $x\in A$, and $f(x)=b\neq a$ otherwise, where $A$ and $\Bbb R-A$ are dense in $\Bbb R$, show that there is no limit as $x\to\infty$ 
Let $A\subseteq \Bbb{R}$ and let $a,b\in \Bbb{R}$ such that $a\neq b$. $A$ and $\Bbb{R}-A$ are dense in $\Bbb{R}$.
Define $f:\Bbb{R}\to\Bbb{R}$:
$$f(x) = \begin{cases} a, &\text{if } x \in A \\   
b, & \text{otherwise}\end{cases}$$
Prove that there is no limit when $x\to\infty$.

I tried proving by contradiction, but I couldn't find any claim that contradicts that there's a limit.
I assumed in contradiction that there's a limit and defined an $\epsilon = 0.5$.
Then from the definition of limit:
$|f(x) - L| = | a - L| < \epsilon$
$|f(y) - L| = | b - L| < \epsilon$
$a-0.5 < L < a + 0.5$
$b-0.5 < L < b + 0.5$
Then I got stuck because I don't see any contradiction here.

Try $\epsilon = 0.5 |b - a|$.  Then use the density of $A$ and $R\setminus A$ to see $L \in (a-\epsilon, a+\epsilon)$ and $L \in (b-\epsilon, b+\epsilon)$, but $\epsilon$ is half of the distance between $a$ and $b$, so these two open intervals won't overlap.  Contradiction.
