map
skylib_fluffos_v3/mudlib/doc/driver/efuns/general/map · 873 B
From the archive skylib_fluffos_v3.zip
Download the archive « Back to the archive contents
.\"modify an mapping/array .DT map $MUDNAME$ driver help map .SH Name .SI 5 map() - modify a mapping, array, or string via application of a function .EI .SH Synopsis .SI 5 mixed map( mixed x, string fun, object ob, mixed extra, ... ); mixed map( mixed x, function f, mixed extra, ... ); .EI .SH Description .SP 5 5 The (ob, fun) syntax works as if (: call_other, ob, fun :) had been passed as `f'. Map returns a new structure containing the return values of `f' being applied to each element of `x'. Currently, it can be used on arrays, mappings and strings. In the case of mappings, both the key and the value are passed to the function. In the case of strings, the characters are passed to the function one at a time as ints. `extra' and all the following arguments are passed to the function after the element. .EP .SH See also .SI 5 filter(), sort_array() .EI