Rewritten to use Pascal's Triangle.
Alternate solution to #15 in haskell.