add solution for even_tree in scala