## Recursive functions

Recursion is the basic mechanism for looping in Haskell.

Determine the [factorial](https://en.wikipedia.org/wiki/Factorial).

```haskell
factorial :: Int -> Int
factorial 0 = 1
factorial n = n * factorial (n-1)
```

The factorial of 3, actually is calculated as such:

```haskell
factorial 3
3 * factorial 2
3 * (2 * factorial 1)
3 * (2 * (1 * factorial 0))
3 * (2 * (1 * 1))
```

