reverse

Returns a sequence containing the same elements as a source sequence, but in reverse order.  The result-sequence is generally of the same class as the source-sequence.

The result-sequence may or may not be freshly allocated.  The source-sequence is not modified by this operation.

The consequences are undefined if the source-sequence is unbounded (circular or infinite).

define variable *x* = list("bim", "bam", "boom")
*x*
⇒ #("bim", "bam", "boom")
reverse(*x*)
⇒ #("boom", "bam", "bim")
*x*
⇒ #("bim", "bam", "boom")

Exported from

Modifiers

open

Arguments

source-sequenceAn instance of <sequence>.

Values

result-sequenceAn instance of <sequence>.
Summary
Returns a sequence containing the same elements as a source sequence, but in reverse order.
Reversing a <range> produces another range.

Functions

reverse

Reversing a <range> produces another range.  An unbounded range cannot be reversed.

The class of arithmetic sequences.
The common-dylan module.
Whenever possible, we have tried to keep the Dylan module pristine and unextended, preferring to add our extensions to separate modules or libraries.
The class of collections whose keys are consecutive integers starting from zero.