99 questions/Solutions/70C
< 99 questions | Solutions
Jump to navigation
Jump to search
(*) Count the nodes of a multiway tree.
nnodes :: Tree a -> Int
nnodes (Node _ ts) = 1 + sum (map nnodes ts)
(*) Count the nodes of a multiway tree.
nnodes :: Tree a -> Int
nnodes (Node _ ts) = 1 + sum (map nnodes ts)