Second Script Game: Skating Scores

colomon on 2008-12-24T15:28:14

This one is simple: take a list of skating scores, drop the highest and lowest, and take the average of the remaining to get the actual score. Perl 6 shines here, with split and the reduction meta operator making for elegant code. But I've hit on a weird snag:

$score = $score - (@scores.min () + @scores.max ());
doesn't compile. Err... but
$score = $score - (@scores.min() + @scores.max());
does. Is space before function parameters no longer allowed?


Space

JonathanWorthington on 2008-12-24T17:20:17

Correct, whitespace there is not allowed in Perl 6.