Apply

Command: Apply


Description

Apply interprets the elements of the input array a as the list
of arguments of the supplied function f
f(a(1) a(2) ... a(n))

This is to be distinguished from Map which individually applies
the function to the elements of the array
[f(a(1) f(a(2) ... f(a(n))]

Parameters

array is an arbitrarily shaped heterogeneous array.
proc is any procedure object (pure function).

Author
Diesmann
Synopsis
array proc Apply -> any
References

[1] The Mathematica Book V4.0 "Apply"
Examples


[1 2] {add} Apply --> 3
[1 2] {dup mul} Map --> [1 4]
[(hell world) 4 (o)] {insert} Apply --> (hello world)

File
lib/sli/mathematica.sli
Remarks

This function is an implementation of Mathematica's Apply function.
FirstVersion
unknown documented 121124