First page Back Continue Last page Graphics
GENERIC FUNCTIONS
Allow us to write our own abstractions.
A generic function is a function where the types of the arguments and the return type are not known until it is used.
"any appropriate type" means the function can accept arguments of a type supported by operations within the function.
e.g. If x and y are arguments and you use the expression x+y, + must be defined for the type of x and y.