Created
September 3, 2014 02:23
-
-
Save sposterkil/2273b63fe7253bca10cf to your computer and use it in GitHub Desktop.
new evaluation()
This file contains hidden or 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
def evaluation(tree): | |
print tree.label | |
if len(tree.children) == 0: | |
return tree | |
else: | |
return apply_op(tree.label, evaluation(tree.children[0]), evaluation(tree.children[1])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment