In programming it is rather the norm than the exception to have functions whose input are different data types. For example a function who produces a substring of a given string would have the following signature in Java:
public static String substring(String s, int n) {..}
Are there examples of such functions in Mathematics and what is their application?