JPMorganChase Interview Question

Write a function to compute the factorial. I had been doing functional programming recently, so the iterative solution didn't pop in my head, and I was using Python (not Haskell) to write the solution. The interviewer seemed confused so he asked me to memoize it using decorators. So I did. That was it for the technical part.