NAME
	map_mapping - map a mapping through a function

SYNOPSIS
	mapping map_mapping(mapping m, string fun, object ob, mixed extra);

DESCRIPTION
	This function calls ob->fun once for each value in the mapping m
	and returns a mapping constructed with the same indices as m, but
	the values returned from m->fun. The optional extra argument is sent
	to the function as a second argument for each call if present.

EXAMPLE
	The code:

	int foo(int x,int y) { return x*y; }
	map_mapping((["foo":1,"bar":5,"gazonk":6]),"foo",this_object(),2);

	Would result in: (["foo":2,"bar":10,"gazonk":12])

SEE ALSO
	map_array, filter_mapping

Help topics available:
_m_delete allocate atoi capitalize clear_bit
crypt ctime explode filter_array filter_mapping
implode intp itoa lower_case m_delete
m_indices m_sizeof m_values map_array map_mapping
mappingp member_array mkmapping objectp pointerp
replace set_bit sizeof sort_array sscanf
stringp strlen test_bit unique_array upper_case

[START|BACK ]




[ NannyMuds main page | FAQ | Contact us ]

You are guest number 117 since November 2019.
This file was last modified: June 2000.