Instance Method

reversed()

Returns an array containing the elements of this sequence in reverse order.

Declaration

func reversed() -> [Element]

Return Value

An array containing the elements of this sequence in reverse order.

Discussion

The sequence must be finite.

Complexity: O(n), where n is the length of the sequence.