list.hs 126 B

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