Created
February 1, 2011 21:02
-
-
Save masak/806666 to your computer and use it in GitHub Desktop.
Perl 6 is so pretty
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
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