Map (higher-order function, aka apply-to-all)
map is the name of a higher-order function that applies a given function to each element of a collection, e.g. a list or set, returning the results in a ==collection== of the same type. It is often called apply-to-all when considered in functional form.
The concept of a map is not limited to lists: it works for sequential containers, tree-like containers, or even abstract containers such as futures and promises.
— Wikipedia
Python example map len
function to list of words
Visual example
Below, you can see a view of each step of the mapping process for a list of
integers X = [0, 5, 8, 3, 2, 1]
that we want to map into a new list X'
according to the function