Distance between Element and Subset of Real Numbers/Examples/Example 1

Example of Distance between Element and Subset of Real Numbers
Let $S \subseteq \R$ be the subset of the set of real numbers $\R$ defined as:
 * $S := \set {0, 1, 2}$

Then:
 * $\map d {3, S} = 1$

where $d$ denotes the distance function.