pyramid problem in haskell