Graph colouring: Difference between revisions

Content deleted Content added
m →‎{{header|zkl}}: add missing test code
SqrtNegInf (talk | contribs)
m →‎{{header|Raku}}: Fix code: Perl 6 --> Raku
Line 844: Line 844:
=={{header|Raku}}==
=={{header|Raku}}==
(formerly Perl 6)
(formerly Perl 6)
<lang perl6>#!/usr/bin/env perl6
<lang perl6>sub GraphNodeColor(@RAW) {

sub GraphNodeColor(@RAW) {
my %OneMany = my %NodeColor;
my %OneMany = my %NodeColor;
for @RAW { %OneMany{$_[0]}.push: $_[1] ; %OneMany{$_[1]}.push: $_[0] }
for @RAW { %OneMany{$_[0]}.push: $_[1] ; %OneMany{$_[1]}.push: $_[0] }