问题 I need to make function returns all possible branches from a tree with this form: data Tree a = EmptyT | NodeT a ( Tree a ) ( Tree a ) deriving (Show) everyBranch :: Tree a -> [[a]] I'm not sure how to approach this... xD I'm still a newbie in Haskell. Let's say that I have: 1 / \ 2 3 /\ / \ 4 5 7 8 I want to get: [[1,2,4], [1,2,5], [1,3,8], [1,3,7]] 回答1: We'll use a recursive approach. Let's start with a rough skeleton: everyBranch :: Tree a -> [[a]] everyBranch EmptyT = _something