Created
December 1, 2021 19:02
-
-
Save gfldex/92a2c28e15fc8850b18b8306c9111ca9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env raku | |
sub day1 { | |
my @pings = <199 200 208 210 200 207 240 269 260 263>».Int; | |
say "The answer for {&?ROUTINE.name} is ", +@pings.rotor(2 => -1).flat.grep({ $^b > $^a }); | |
} | |
sub MAIN { | |
.() for UNIT::.values.grep({ .?name && .?name.starts-with: 'day' }).sort(*.name); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment