Jump to content

Power set: Difference between revisions

m
→‎Logical (cut-free) Definition: remove redundant comment
(Logical (cut-free) Definition)
m (→‎Logical (cut-free) Definition: remove redundant comment)
Line 1,715:
<lang Prolog>
powerset(X,Y) :- bagof( S, subseq(S,X), Y).
 
/* subseq(X,Y) will only be true if the list X is a subsequence of the list Y */
 
subseq( [], []).
2,519

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.