[Haskell] Problems with using the memo-function