Skip to content

Instantly share code, notes, and snippets.

@gfldex
Last active August 15, 2016 14:32
Show Gist options
  • Save gfldex/79f54dda830c88b8eb4e7f5553ae6770 to your computer and use it in GitHub Desktop.
Save gfldex/79f54dda830c88b8eb4e7f5553ae6770 to your computer and use it in GitHub Desktop.
use v6;
sub find-files ($dir, Mu :$test = none <. .. .git>) {
gather for $dir {
take .IO when .IO.f || .IO.Str ~~ $test;
.IO.dir(test => $test).sort({.f})».&?BLOCK when .IO.d
}
}
say find-files('../..')[^50]».Str;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment