27.21 Reversed

Reversed( list )

Reversed returns a new list that contains the elements of the list list, which must not contain holes, in reverse order. The argument list is unchanged.

    gap> Reversed( [ 1, 4, 5, 5, 6, 7 ] );
    [ 7, 6, 5, 5, 4, 1 ] 

The result is a new list, that is not identical to any other list. The elements of that list however are identical to the corresponding elements of the argument list (see Identical Lists).

Previous Up Top Next
Index

GAP 3.4.4
April 1997