Tree from list and height functions.