summaryrefslogtreecommitdiff
path: root/prolog/problems/lists_advanced/rev_2/en.py
blob: a8161a61a3720dfaaaf80924624fb8ca190cf891 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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([1,2,3], X).
  X = [3,2,1].
?- rev([], X).
  X = [].
</pre>'''

hint = {}