Map (higher-order function): Difference between revisions

Content deleted Content added
Reverted 1 edit by Thomasb892 (talk): Rmv inline EL (TW)
m linking
Line 4:
In many [[programming language]]s, '''map''' is the name of a [[higher-order function]] that applies a [[procedural parameter|given function]] to each element of a [[functor]], e.g. a [[list (computing)|list]], returning a list of results in the same order. 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 [[Container (abstract data type)|containers]], tree-like containers, or even abstract containers such as [[futures and promises]].
 
==Examples: mapping a list ==