sitelogo
reverse/2/3

reverses a list.

reverse(?List, ?ReverseList)

reverse/2 reverses List and unifies the result with ReverseList.

Arguments

List                   list
ReverseList            list

Examples

reverse([a,b],X). Succeeds with substitution X <- [b,a].

Standard

These predicates are not part of the ISO-Prolog Standard.

See also

append/3, member/2, sort/2. merge_sort/2.


Up read on...
scroll to top managed with ubiCMS