aboutsummaryrefslogtreecommitdiff
path: root/challenge-059/markus-holzer/raku/ch-2.p6
blob: 35c3074e93c7495aa2a333292ec6dacdfa647327 (plain)
1
2
3
4
5
6
7
sub MAIN( *@n where *.elems > 0 ) 
{
    say [+] @n.combinations( 2 ).map: -> ( Int $a, Int $b )
    {
        ( $a +^ $b ).base( 2 ).indices( 1 )
    }
}