Skip to content

Instantly share code, notes, and snippets.

@masak
Created February 1, 2011 21: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 masak/806666 to your computer and use it in GitHub Desktop.
Save masak/806666 to your computer and use it in GitHub Desktop.
Perl 6 is so pretty
method DEBUG() {
sub helper($node, $index) {
say ' ' x $index, $node.WHAT;
helper($_, $index + 1) for $node.children;
}
helper(self, 0);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment