map()

btmux-0.6-rc4/game/text/help/cat_mux/cat_functions/map() · 543 B

From the archive btonline-btechmux-0.6-rc4.tbz2

Download the archive   « Back to the archive contents

& map()
 
  Syntax: map([<obj>/]<attr>, <list>[, <delim>])
 
  This function is nearly identical to an iter() operating on u() 
  function. Each member of <list> is passed to the result of fetching 
  <attr> as %0, and the results are used to form a new list, separated 
  by the delimiter character.
 
  <delimiter> may be used to specify a delimiter other than space.
 
  Example:
 
  > &ADD_ONE object=add(%0,1)
  > say map(object/add_one,1 2 3 4 5)
  You say "2 3 4 5 6"
 
	See Also: filter(), fold(), iter(), parse(), u()

Site Stats

Snippets: 1791
Codebases: 571