Course of prolog and haskell