IF Computer > MINERVA > Manual > Reference > Predicates > Lists > reverse/2/3

reverse/2/3

MINERVA
ifcomputer logo
f
Expert Services on the Web

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.

document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/lists/reverse/print_en.html
published 2008/10/6 update 2001/2/7 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 start (AT) ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
Back> managed with ubiCMS