|
cdr
|
Overview
The cdr function returns the tail of the specified object.
.
List
The cdr function is applicable to a List (a set of Pairs linked together)
and returns the tail of a List. The {repeat} argument is an optional argument
and if it is present it must be an integer which can be from 1 to 4 and indicates the
number of times to apply the cdr operator to the List. In other words
(cdr list 3) is equivalent to (cdddr list) .
.
Usage
The cdr function is the only function to reference the tail of a structure
,dictionary, directory, vector, Brick or matrix.
The ref function will not return the tail nor will indexing with the [ ]
operators return the tail.
List
The cdr function is used to retrieve the tail of a list. The cdr
function can be applied sequentially up to 4 times by repeating the "d" as in
cddr, cdddr, cddddr. Alternatively, the number of repeats can be specified
as an argument to cdr as in (cdr list 4) is equivalent to (cddddr list 4).
Syntax
Arguments |
Name |
Type |
Description |
Argument: | vector | Vector FltVector CpxVector ShortVector IntVector NumVector ObjVector BitVector |
The vector argument. |
---|
Returns: |
If the vector contains a cdr (or tail) it will return the tail otherwise,
cdr will return #void
|
---|
Expression: |
(cdr structure)
|
Arguments |
Name |
Type |
Description |
Argument: | structure | Structure |
The Structure argument. |
---|
Returns: |
If the structure contains a cdr (or tail) it will return the tail otherwise,
cdr will return #void
|
---|
Arguments |
Name |
Type |
Description |
Argument: | dict | Dictionary |
The Dictionary argument. |
---|
Returns: |
If the dictionary contains a cdr (or tail) it will return the tail otherwise,
cdr will return #void
|
---|
Expression: |
(cdr directory)
|
Arguments |
Name |
Type |
Description |
Argument: | directory | Directory |
The directory argument. |
---|
Returns: |
If the directory contains a cdr (or tail) it will return the tail otherwise,
cdr will return #void
|
---|
Arguments |
Name |
Type |
Description |
Argument: | brick | Brick |
The brick argument. |
---|
Returns: |
If the Brick contains a cdr (or tail) it will return the tail otherwise,
cdr will return #void
|
---|
Arguments |
Name |
Type |
Description |
Argument: | matrix | Matrix |
The matrix argument. |
---|
Returns: |
If the Matrix contains a cdr (or tail) it will return the tail otherwise,
cdr will return #void
|
---|
Expression: |
(cdr nummatrix)
|
Arguments |
Name |
Type |
Description |
Argument: | matrix | NumMatrix |
The matrix argument. |
---|
Returns: |
If the NumMatrix contains a cdr (or tail) it will return the tail otherwise,
cdr will return #void
|
---|
Expression: |
(cdr list)
(cddr list)
(cdddr list)
(cddddr list)
(cdr list numRepeats)
|
Arguments |
Name |
Type |
Description |
Argument: | list | List |
A List. |
---|
Argument: | numRepeats | Integer |
The number of times to repeat the cdr function on the List. |
---|
Returns: |
The tail of the List argument.
|
---|
Examples
Here are a number of links to Lambda coding examples which contain this instruction in various use cases.
Argument Types
Here are the links to the data types of the function arguments.
Here are also a number of links to functions having arguments with any of these data types.
|
Analytic Information Server (AIS)
AIS Component Systems
- Smartbase Engine
- QT C++ Libraries
- MySQL Relational Database
- AIS Lisp Libraries
- Rapid Analytic Demo IDE
|