Skip to main content
Version: 1.6.0

Mapping

We may want to change all the elements of a given list by applying to them a function. This is called a map operation, not to be confused with the map data structure. The predefined functional iterator implementing the mapped operation over lists is called List.map and is used as follows.

const plus_one = List.map(i => i + 1, [6, 2, 3, 3]);

See predefined namespace List.