
Are you ready for Perl6? - cygx
https://github.com/cygx/p6-tinycc/commit/43987c8ef008513012a820b682c8a049a04af443
======
esaym
How about an explanation of what is going on here?

~~~
cygx
It's a combination of the | prefix operator that interpolates into a list, the
~ prefix stringification operator and the => infix pair constructor via <<
hyper operators so it works with a single value on the left and an array on
the right.

So if $bin contained a list like [42, "foo", 7], we would get out a list of
pairs

    
    
        1 => "42", 1 => "foo", 1 => "7"
    

Another way to write it would have been something along the lines of

    
    
        ($bin // Empty).map({ 1 => .Str }).slip
    

I did _not_ set out to write the code as obscurely as possible - it just
happened 'naturally' ;)

