Name

maplist — Maps an operation onto all elements of a list and thus creates a new list.

Synopsis

list<any> maplist ( any VAR ,
  list<any> LIST ,
  block EXPR );
 

Parameters

any VAR

list<any> LIST

block EXPR

Return

list<any>

Description

For each element of the list LIST the expression EXPR is evaluated in a new block, where the variable VAR is assigned to that value. The result is the list of those evaluations.

Usage

  maplist (integer v, [1, 2, 3, 5], { return (v + 1); }) -> [2, 3, 4, 6]