HomeManualTopicsTypesSymbols

std_types::hash_set/std::map_reduce

combines a map and a reduce operation into a single operation

Parameters

self
the set to work on
map_function
the function to apply to each element of the set
reduce_function (default: append)
the function to apply to each member of the set
unit (default: undefined)
the value to return for empty sets

Results

None

Description

Does not create an intermediate set to hold the "mapped" values.

Topic

Tables

Implements

std::map_reduce combines a map and a reduce operation into a single operation

See also

std::map applies a function to all items of a collection
std::reduce computes a kind of sum from the items of a collection