www.delorie.com/gnu/docs/calc/calc_232.html | search |
Buy the book! | |
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The commands in this section allow for more general operations on the elements of vectors.
The simplest of these operations is V A (calc-apply
)
[apply
], which applies a given operator to the elements of a vector.
For example, applying the hypothetical function f
to the vector
`[1, 2, 3]' would produce the function call `f(1, 2, 3)'.
Applying the +
function to the vector `[a, b]' gives
`a + b'. Applying +
to the vector `[a, b, c]' is an
error, since the +
function expects exactly two arguments.
While V A is useful in some cases, you will usually find that either V R or V M, described below, is closer to what you want.
10.8.1 Specifying Operators 10.8.2 Mapping 10.8.3 Reducing 10.8.4 Nesting and Fixed Points 10.8.5 Generalized Products
webmaster donations bookstore | delorie software privacy |
Copyright © 2003 by The Free Software Foundation | Updated Jun 2003 |