Created
February 17, 2018 18:57
-
-
Save tk3369/1de6a0dc757ccb217aadbaa7dd87d27b to your computer and use it in GitHub Desktop.
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
""" | |
Print a subtype tree from the specified `roottype` | |
""" | |
function subtypetree(roottype, level=1, indent=4) | |
level == 1 && println(roottype) | |
for s in subtypes(roottype) | |
println(join(fill(" ", level * indent)) * string(s)) | |
subtypetree(s, level+1, indent) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment