A function is said to be total if it’s defined for it’s entire domain. That is, A => B
is total if there is a B
for every possible A
.
A function that is not total is said to be partial.
For example, in the following code:
def int2str(i: Int): String = i.toString
def str2int(s: String): Int = Integer.parseInt(s)