I'd like to save the output of my recursive function as a list.
> (getNames(74, foo))
[1] "Excavata"
[1] "Excavata"
[1] "Excavata"
[1] "Excavata"
[1] "Stramenopiles"
[1] "Stramenopiles"
[1] "Stramenopiles"
[1] "Excavata"
[1] "Excavata"
[1] "Metazoa"
How do I go about doing this? Maybe this is simpler than I think but I've been stuck for a couple of days!
I don't think the code here matters: the general idea of my question regards saving the output of a recursive function (such as towers of hanoi) as a data type such as a list or a data.frame.