Create a generator that produces factorials. The first value returned is $1!$, the second $2!$, the third $3!$, etcetera, up to $10!$. Do not calculate the factorial every time from scratch, but retain the value that you used in the previous cycle and use that.