list.hs 113 B

123456
  1. data List = Ground | Leaf Integer List
  2. hyperSum xs = case xs of
  3. Ground -> 0
  4. Leaf x tail -> x + hyperSum tail