Apply:
string apply( list list, string expression )
Returns a new list consisting of the values obtained by applying 'expression' to each element of the input list list. In the expression you can give the keyword this to refer to the current list item
Example: Add "_1" to a list of strings
STRING LIST mlist = {'a', 'b', 'c', 'd'}
STRING LIST ulist = apply(mlist, "this + '_1'")
print ${ulist[0]}
// prints "a_1"
print ${ulist[1]}
// prints "b_1"
Example: To find the minimum Z value of the toolpaths in an NCProgram
PRINT = min(apply(folder('ncprogram'), 'limits(this)[4]'))
max:
real max( list numeric a )
Find the largest value in a list of numbers.