summaryrefslogtreecommitdiff
path: root/prolog/problems/lists/rev_2/en.py
blob: c4800b6e8c9aed7bf0b4c99b1b36a68fc58ac2f7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# coding=utf-8

id = 111
name = 'rev/2'
slug = 'reverse a list'

description = '''\
<p><code>rev(L1, L2)</code>: the list <code>L2</code> is obtained from <code>L1</code> by reversing the order of the elements.</p>
<pre>
  ?- rev([], X).
    X = [].
  ?- rev([1,2,3], X).
    X = [3,2,1].
</pre>'''

hint = {}