Yoneda encoding in Haskell
some comments added