church encoding in haskell