exercise 2.64 list->tree