Functional vs Procedural Programming

Consider this Haskell function.

square x = x * x

It is essentially an equation and a Haskell program is essentially a set of equations.

We say functional programming languages such as Haskell are declarative.

A Haskell program defines more what is to be computed rather than how to compute it.

Index