Ramsey's theorem: Difference between revisions
Content added Content deleted
SqrtNegInf (talk | contribs) m (→{{header|Perl}}: Fix link: Perl 6 --> Raku) |
SqrtNegInf (talk | contribs) m (→{{header|Ruby}}: Fix comment: Perl 6 --> Raku) |
||
Line 1,483: | Line 1,483: | ||
end |
end |
||
a.each {|row| puts row.join(' ')} |
a.each {|row| puts row.join(' ')} |
||
# check taken from |
# check taken from Raku version |
||
(0...17).to_a.combination(4) do |quartet| |
(0...17).to_a.combination(4) do |quartet| |
||
links = quartet.combination(2).map{|i,j| a[i][j].to_i}.reduce(:+) |
links = quartet.combination(2).map{|i,j| a[i][j].to_i}.reduce(:+) |