Skip to content

Instantly share code, notes, and snippets.

@gfldex
Created December 1, 2021 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfldex/92a2c28e15fc8850b18b8306c9111ca9 to your computer and use it in GitHub Desktop.
Save gfldex/92a2c28e15fc8850b18b8306c9111ca9 to your computer and use it in GitHub Desktop.
#! /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