Input/Output:
|
| Ln+2/A1 ... | L2/An+1 | L1/An+2 |
| Level 1/Item 1 | |
|
|
|
|
|
|
|
|
|
| { list }1 | ... { list }n | n | « program » | → | { results } |
|
| { list }1 | ... { list }n | n | command | → | { results } |
|
| { list }1 | ... { list }n | n | name | → | { results } |
|
| { list }1 ... | { list }n+1 | « program » | → | { results } | |
|
| { list }1 ... | { list }n+1 | command | → | { results } | |
|
| { list }1 ... | { list }n+1 | name | → | { results } | |
|
|
|
|
|
|
| |
|
|
| L = Level; A = Argument |
|
|
| |
Example: | { 1 2 3 } { 4 5 6 } { 7 8 9 } 3 « + * » DOLIST returns | ||||||
| { 11 26 45 }. |
|
|
|
| ||
See also: | DOSUBS, ENDSUB, NSUB, STREAM |
|
|
| |||
|
|
|
|
|
|
|
|
DOMAIN |
|
|
|
|
|
|
|
Type: | Command |
|
|
|
|
|
Description: For a function of the current variable, lists the domains of real numbers for which the function is defined and for which it is undefined. DOMAIN works for functions of more than one argument, for example DOMAIN (X*X), and for user defined functions, as in the example below. For functions which it does not recognize, DOMAIN returns the message “Unknown operator”.
Access: | Catalog, …µ | |
Input: | Level 1/Item 1: A function, or an expression, in terms of the current variable. | |
Output: | Level 1/Item 1: A list with regions where the function is undefined marked by '?' and regions | |
| where the function is defined marked by +. Rational singularities, such as 0 in 1/x, are not listed. | |
Flags: | Exact mode must be set (flag | |
| Numeric mode must not be set (flag | |
Example: | Define a function f =√(a+1) by typing DEF(F(A)=√(A+1)). Then tabulate the domain over which | |
| it is defined and undefined. | |
Command: | DOMAIN(F(X)) | |
Result: | ||
| defined from | |
See also: | SIGNTAB, TABVAR | |
DOSUBS | Command | |
Type: | ||
Description: | Do to Sublist Command: Applies a program or command to groups of elements in a list. | |
| The real number n can be omitted when the first argument is one of the following: | |
| • | A command. |
| • | A user program containing a single command. |
| • | A program with a |
| • | A global or local name that refers to one of the above. |
The first iteration uses elements 1 through n from the list; the second iteration uses elements 2 through n + 1; and so on. In general, the mth iteration uses the elements from the list corresponding to positions m through m + n – 1.
During an iteration, the position of the first element used in that iteration is available to the user using the command NSUB, and the number of groups of elements is available using the