summaryrefslogblamecommitdiff
path: root/70b-73/71.hs
blob: e99c3febffd2dbf01c0a3de367f882dea4b0909a (plain) (tree)
1
2
3
4
5
6





                                                                
data Tree a = Node a [Tree a] deriving (Eq, Show)

ipl :: Tree a -> Int

ipl = ipl' 0
    where ipl' l (Node _ xs) = l + (sum $ map (ipl' (l + 1)) xs)