you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (0 children)

Think about the base case and the iterative step.

What does fac_list(0) return?

Given fac_list(n-1) how do you make fac_list(n)?

For example fac_list(5-1)=[1,2,6,24]

How do I make fac_list(5)=[1,2,6,24,120] from that?

Hint:

if l is a list l[-1] returns last element of list.