diff options
| -rw-r--r-- | challenge-013/simon-proctor/perl6/ch-1.p6 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/challenge-013/simon-proctor/perl6/ch-1.p6 b/challenge-013/simon-proctor/perl6/ch-1.p6 index 32fd36f940..2afdf0dbaf 100644 --- a/challenge-013/simon-proctor/perl6/ch-1.p6 +++ b/challenge-013/simon-proctor/perl6/ch-1.p6 @@ -8,7 +8,7 @@ sub date-format( $date ) { sprintf "%04d/%02d/%02d", .year, .month, .day given $ sub MAIN ( Int() $year #= Year to list Fridays for. ) { - say( date-format( $_ ) ) for (Date.new( :$year, :1month, :1day, formatter => &date-format )...Date.new( :$year, :12month, :31day, formatter => &date-format )) + say( date-format( $_ ) ) for (Date.new( :$year, :1month, :1day )...Date.new( :$year, :12month, :31day )) .grep( *.day-of-week() == 5) .sort( { $^b <=> $^a } ) .grep( { state $m = 13; if ( $_.month < $m ) { $m = $_.month;True } else { False } }) |
