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

id = 110
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 = {}