Skip to content

Commit

Permalink
Sort the output
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Feb 3, 2019
1 parent b56cc65 commit af84b6e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions Lotto.pm
Expand Up @@ -59,6 +59,14 @@ sub play {
push @results, \@nums;
}


# TODO: Sort on the correct number of values.
@results = sort {
($a->[0][0] <=> $b->[0][0]) or
($a->[0][1] <=> $b->[0][1]) or
($a->[0][2] <=> $b->[0][2])
} @results;

return @results;
}

Expand Down

0 comments on commit af84b6e

Please sign in to comment.