My go at implementing a cat-like program in Haskell