summaryrefslogtreecommitdiff
path: root/prolog/problems/sets/intersect_3/en.py
blob: 7fe1074ba5bd3214b9aa29bca2f94d8988517deb (plain)
1
2
3
4
5
6
7
8
9
10
11
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 = {}