I was asking a question about metric space, and metric function, and was confused of what values can a set contain, respectively to the fact, that this set elements are passed as arguments to the metric function:
$$d: M \times M\space to\space \mathbb{R}$$
@Golden_Ratio answered that set may contain from entities of different types, for example
$$M:=\{\text {1(number), \{2, 3\}(vector, array)}\}$$
And arguments of the metric function are provided no matter of the expected type, just like
$$d(x, y)$$
If it is true, how to write the function equation that handles different types of variales, i.e. $x$ may be number as well as vector or a plane, or something else?
If there are kinda conditional statements in math, like in programming, so we can write
d(x, y) = 2x + y.x*y.y, typeof x == integer OR 2y + x.x*x.y