app app map f nil nil app app map f app app cons x xs app app cons app f x app app map f xs app app le 0 y true app app le app s x 0 false app app le app s x app s y app app le x y app app maxlist x app app cons y ys app app if app app le x y app app maxlist y ys app app maxlist x nil x app height app app node x xs app s app app maxlist 0 app app map height xs app 2 map 0 nil 0 cons 0 le 0 0 0 true 0 s 0 false 0 maxlist 0 if 0 height 0 node 0 FULL ./TRS/higher-order/Bird/TreeHeight.trs