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

id = 129
name = 'intersect/3'
slug = 'find the intersection of two sets'

description = '''\
<p><code>intersect(S1, S2, I)</code>: the list <code>I</code> contains every element that appears in both <code>S1</code> and <code>S2</code>, with no duplicates.</p>
<pre>
  ?- intersect([1,5,6,3,4,2], [8,1,5,9,4,3], I).
    I = [1,5,3,4].
</pre>'''

hint = {}