blob: c1d0c1a80b0aaab320efd3cadab3724df4998cfd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
# coding=utf-8
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 = {}
|