Factorial

Factorial can be defined recursively as f(n) = n*f(n-1), with a base case value of f(0) = 1.

Your task is to write a function factorial which takes a single number n and returns f(n).