Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- val tree: Tree[String] =
- Node("c",
- Node("b",
- Node("a", Empty(), Empty()),
- Node("a",
- Node("r", Empty(), Empty()),
- Empty()
- )
- ),
- Node("d",
- Node("a", Empty(), Empty()),
- Node("b",
- Node("a", Empty(), Empty()),
- Node("r",
- Empty(),
- Node("a", Empty(), Empty())
- )
- )
- )
- )
- p(sum(tree)) // prints ###> abracadabra
Advertisement
Add Comment
Please, Sign In to add comment