when -1 { return (9, $result_2 == $result_3 ?
+? -1 :: 1 }
a syntax error (mismatched parentheses)? If so, there are a few lines like that. Also, one line refers to
when 0 { return (12, %ball{12} <=> %ball{0}) }
where 0 should probably be 1. Finally, I confirm all of djohnston's results by translation to Perl 5 (for example, just imagine ball 1 is heavier and run through the code mentally --- it indeed says something about either ball 3 or 5). Pardon the ugly code; the Perl 6 is certainly prettier. But as Limbic~Region says, solving the riddle isn't the challenge, right?
|