Documentation Prolog Predicate Reference lists reverse/2

reverse/2

Invert the order of the elements in a list.

Description

reverse( ?list, ?list )

reverse(List, ReversedList) is true if and only if ReversedList is a list whose elements have been reordered so their positions are inversed respect to their position in List.

Implementation