Jump to content

Power set: Difference between revisions

→‎{{header|Perl 6}}: fix output from buggy .combinations, now fixed
(→‎{{header|Perl 6}}: modernize to use .combinations)
(→‎{{header|Perl 6}}: fix output from buggy .combinations, now fixed)
Line 1,520:
<lang perl6>say set (set <a b c d>).combinations.map: *.Set</lang>
{{out}}
<pre>set(set(), set(a), set(b), set(c), set(d), set(a, b), set(a, c), set(a, d), set(b, c), set(b, d), set(c, d), set(a, b, c), set(a, b, d), set(a, c, d), set(b, c, d), set(a, b, c, d))</pre>
 
=={{header|PHP}}==
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.