EFUN: unique_array

SYNTAX:
mixed *unique_array( arr, group_fun );
  mixed *arr;
  string group_fun;

DESCRIPTION:
The array 'arr' must be an array of objects, other types are ignored.
Unique_array creates a multidimensional array (an array of which the
elements themselves are arrays). Within each sub-array those elements
of 'arr' are grouped for which arr[ element ]->group_fun() returns
the same value.

RETURN VALUE:
If the array 'arr' is not an array of objects, an empty array is returned.
Otherwise the return value is an array of arrays (of objects), in the form:
({
  ({ ob_same_1[0], ob_same_1[1], ob_same_1[2], .... ob_same_1[n] }),
  ({ ob_same_2[0], ob_same_2[1], ob_same_2[2], .... ob_same_2[n] }),
  ({ ob_same_3[0], ob_same_3[1], ob_same_3[2], .... ob_same_3[n] }),
  ....
  ({ ob_same_m[0], ob_same_m[1], ob_same)m[2], .... ob_same_m[n] }),
});

SEE ALSO:
sort_array
filter_array
map_array

EXAMPLE:
Currently logged on (as determined by the users() efun):
  Mudmaniac (player#243, level 7), Orcslayer (player#573, level 18),
  MisterX (player#334, level 9), Jupitter (mudgod#46, level 1000),
  Sneaky (player#642, level 18), Bambam (player#279, level 7)

object *level_groups;

level_groups = unique_array( users(), "query_level" );
// level_groups is now ({ ({ player#243, player#279 }),
//   ({ player#334 }), ({ player#573, player#642 }), ({ mudgod#46 }) }).
