Haskell is a pure functional language. This means functions in Haskell behave closer to mathematical functions. A function…