Try your code again in irb.
then, in irb
Should give you the answer.
When you def gen_times, actually, you are telling how to create an
instance of Proc with a code block. gen_times’s code block happens to
take the factor and multiply it by n
this is like a function object.
If you’ve only been at it one week, don’t worry. It will become clear!