Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

# set obj [ objarray_map {list_arguments body_proc} list_of_arrays

Creates a new objarray whose i-element is created by evaluating the lambda function with arguments <list_arguments> and body <body_proc> on the i-element of each array in <list_of_arrays>.

e.g.

Code Block
languagetcl

# example:
#
set oa1 [ objarray new_from_to 2 5]
# set oa2 [ objarray new_from_to 6 9]
# objarray_map {{x y} {expr $x + $y}} [ list $oa1 $oa2]
# --> 8.0 10.0 12.0 14.0