Calculus in Haskell