# coding=utf-8 id = 111 name = 'rev/2' slug = 'reverse a list' description = '''\
rev(L1, L2): the list L2 is obtained from L1 by reversing the order of the elements.
rev(L1, L2)
L2
L1
?- rev([], X). X = []. ?- rev([1,2,3], X). X = [3,2,1].