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

name = 'insert/3'
slug = 'insert an element into list'

description = '''\
<p><code>insert(X, L1, L2)</code>: the list <code>L2</code> is obtained from <code>L1</code> by inserting the element <code>X</code> at arbitrary position.</p>
<pre>
  ?- insert(1, [2,3], L).
    L = [1,2,3] ;
    L = [2,1,3] ;
    L = [2,3,1].
</pre>'''

hint = {}