apply

Help Contents Template Based Iteration apply
Template Based Iteration invoke

apply template inputlist


command or operation. Runs the "template," filling its slots with the members of "inputlist." The number of members in "inputlist" must be an acceptable number of slots for "template." It is illegal to apply the primitive to as a template, but anything else is okay. APPLY outputs what "template" outputs, if anything.

Examples:

show apply [?+?] [1 3 5]		;2
show apply [?1+?2] [1 3 5]		;4
show apply "sum [1 2 3]		;6
show apply [[x] :x+3] [5]		;8
show apply [[x] [output :x+3]] [5]		;8

See also:

Examples:

References:

Template Based Iteration invoke