Skip to main content
Version: 1.3.0


We may want to change all the elements of a given set 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 sets is called and is used as follows.

const s: set<int> = Set.literal(list([5,1,2,2]));
// plus_one == Set.literal(list([6,2,3]))
const plus_one: set<int> = => i + 1, s);

Note: See the predefined namespace Set