[Haskell-cafe] Generalizing three programs