summaryrefslogtreecommitdiff
path: root/prolog/problems/sets/powerset_2/en.py
blob: 83b67f0749983eff0ecd0ec33fb83ce0aa01120f (plain)
1
2
3
4
5
6
7
8
9
10
11
name = 'powerset/2'
slug = 'find all subsets of a set'

description = '''\
<p><code>powerset(Set, Powerset)</code>: the list <code>Powerset</code> contains all subsets of <code>Set</code>.</p>
<pre>
?- powerset([1,2,3], L).
  L = [[1,2,3],[1,2],[1,3],[1],[2,3],[2],[3],[]].
</pre>'''

hint = {}