unique_mapping |
Discworld driver help |
unique_mapping |
Name
unique_mapping() - partition an array into groups
Synopsis
mapping unique_mapping( mixed *arr, string fun, object ob,
mixed extra, ... );
mapping unique_mapping( mixed *arr, function f, mixed extra, ... );
Description
unique_mapping() evaluates the function `f' with each element of the array `arr', and constructs a mapping with the return values as keys, and subarrays of elements that returned value `value' as values.