ES2 MUD LIB :: 東方故事二(ES2) 天朝帝國 mudlib 瀏覽展示

/doc/efuns/map_array

HOME :: doc :: efuns :: map_array

     mmmmaaaapppp____aaaarrrrrrrraaaayyyy((((3333))))           MMMMuuuuddddOOOOSSSS ((((5555 SSSSeeeepppp 1111999999994444))))            mmmmaaaapppp____aaaarrrrrrrraaaayyyy((((3333))))

     NNNNAAAAMMMMEEEE
          map_array() - modify an array of elements via application of
          a function

     SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
          mixed *map_array( mixed *arr, string fun, object ob,
                            mixed extra, ... );
          mixed *map_array( mixed *arr, function f, mixed extra, ... );

     DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
          Returns an array holding the items of `arr' mapped through
          either `ob->fun()' or 'f'.  The function is called for each
          element in 'arr' with that element as a parameter. A second
          parameter `extra' is sent in each call if given.  Principal
          function:

               foreach (index) arr[index] = ob->fun(arr[index],extra);

          The value returned by `ob->fun(arr[.index.], extra)' replaces the existing
          element in the array. If `arr' is not an array, then 0 will be returned.

     SSSSEEEEEEEE AAAALLLLSSSSOOOO
          filter_array(3), sort_array(3), map(3)

     Page 1                                          (printed 3/16/95)

HOME :: doc :: efuns :: map_array