Implement traverse_preorder for bintree