summaryrefslogtreecommitdiff
path: root/prolog/problems/lists/insert_3/en.py
blob: c4640abb5a9e664d66e063fee14afb9319454879 (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 = {}