Skip to content

Instantly share code, notes, and snippets.

@zoffixznet

zoffixznet/p6.p6 Secret

Created February 25, 2017 23:59
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 zoffixznet/635a974885182ad3f0081ab39d9d707f to your computer and use it in GitHub Desktop.
Save zoffixznet/635a974885182ad3f0081ab39d9d707f to your computer and use it in GitHub Desktop.
my $matcher = { try .can('say') };
.say for unique sort map *.^name, eager grep $matcher, gather {
my Mu %seen{Mu};
for CORE::.keys.grep(* ne 'IterationEnd') {
try {.^methods} and take $_ given CORE::{$_};
sub dig ($stash) {
for $stash.keys {
try {.^methods} and take $_ given $stash{$_};
next if %seen{ $_ }++;
try { .keys } and .&dig given $stash{$_}.WHO;
}
}(CORE::{$_}.WHO) if try CORE::{$_}.WHO.keys;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment