2 ms·
One way to do it in Perl 6: > <brown red green yellow yellow brown brown black>.Mix mix(red, yellow(2), brown(3), black, green) See http://doc.perl6.org/t
by raiph 11y ago
One way to do it in Perl 6:
> <brown red green yellow yellow brown brown black>.Mix
mix(red, yellow(2), brown(3), black, green)
See http://doc.perl6.org/type-composite.html http://doc.perl6.org/type-composite.html for a little more info about Mix and other composite types shipped in stock Perl 6 distributions. (Warning: this end user doc is still very incomplete and immature.)