RosettaCodeData/Task/Power-set/Perl-6/power-set-1.pl6
2014-04-02 16:56:35 +00:00

2 lines
84 B
Raku

sub powerset(Set $s) { $s.combinations.map(*.Set).Set }
say powerset set <a b c d>;