RosettaCodeData/Task/Power-set/Perl-6/power-set-1.pl6

3 lines
84 B
Raku
Raw Permalink Normal View History

2014-04-02 16:56:35 +00:00
sub powerset(Set $s) { $s.combinations.map(*.Set).Set }
say powerset set <a b c d>;