map(table, function)
Pass each key/value pair in a table to a function.
The function returns a new key/value pair or null. The map function returns a table
containing all of the results from the
function.
Example
function swap(key,value) return value, key end
t = map({5,4,3,2,1}, swap)