The following problem is Exercise 7.K from the book van Rooij-Schikhof: A Second Course on Real Functions and it is very close to a question which was recently discussed in chat.
So I thought that sharing this interesting problem with other MSE users could be useful. Here's the problem:
Let $L$ be the set of all functions $f\colon [0,1]\to\mathbb R$ that have the property that $\lim\limits_{x\to a} f(x)$ exists for all $a \in [0, 1]$. Show that:
(i) $L$ is a vector space. Each $f \in L$ is bounded.
(ii) For each $f \in L$, define $f^c(x): = \lim\limits_{y\to x} f(y)$ ($x \in [0, 1]$). $f^c$ is continuous.
(iii) '$f^c =0$' is equivalent to 'there exist $x_1, x_2, \dots$ in $[0,1]$ and $a_1, a_2,\dots$ in $U$ with $\lim\limits_{n\to\infty} a_n = 0$, such that $f(x_n) = a_n$ for every $n$, and $f=0$ elsewhere'.
(iv) Describe the general form of an element of $L$. Show that every $f\in L$ is Riemann integrable.
The original question in the chat was about functions $\mathbb R\to\mathbb R$, but it does not change much in the parts (iii) and (iv).