summaryrefslogtreecommitdiff
path: root/prolog/problems/lists/insert_3/en.py
blob: 5553445acafa78e998684ec25f93a5322d758cfa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
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 = {}