[Haskell] Re: refactoring, catamorphism, termination of programs