Example:List as a function
Many data structures can be represented by functions with a specialized domain or codomain. For example, one could represent a list of natural numbers as a function ; the kth element of the list would be .
For example, the list
[5,7,1] would be represented as the function given by , , and .