summaryrefslogtreecommitdiff
path: root/prolog/problems/lists/dup_2/en.py
blob: 3639683fe2b3dea7ea6374afe2dbffd1cc4663b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
name = 'dup/2'
slug = 'duplicate the elements of a list'

description = '''\
<p><code>dup(L1, L2)</code>: the list <code>L2</code> is obtained from <code>L1</code> by duplicating every element.</p>
<pre>
?- dup([1,2], X).
  X = [1,1,2,2].
?- dup([1,2,3], X).
  X = [1,1,2,2,3,3].
</pre>'''

hint = {}