map or apply or of applies a function to a list
of elements.
of is the prefixed function equivalent to the parenthesis :
Xcas translates f(x) internally to of(f,x).
It is more natural to call map
or apply than of. Be careful with the order of arguments
(that is required for compatibility reasons).
Note that apply returns a list ([])
even if the second argument is not a list.
Input :
^
2,[3,5,1])or :
^
2,[3,5,1])or :
^
2)or first define the function h(x)=x2, input :
^
2then :
or :
or :
Output :
Next example, define the function g(x)=[x,x2,x3], input :
^
2,x^
3]then :
or :
or :
Output :
Warning!!! first purge x if x is not symbolic.
Note that if l1,l2,l3 are lists
sizes([l1,l2,l3]) is equivalent to map(size,[l1,l2,l3]).