Into the Forest
I think I'm slowly getting the hang of recursion. Writing it doesn't take quite as long as before and my head can slowly wrap around the logic of using the function within itself. However, a new problem was introduced: Trees.
I'm not going to lie, I fell asleep for most of the class on the topic of trees. To no surprise, the notion of how trees were set up made no sense until I actually played around with the code. I now understand that each child is its own tree, and calling upon a tree's children creates a list of the names of the trees that can be called upon, rather than the values of the children themselves. After learning this, writing recursive code through trees became easier, but it still took sometime. I particularly had trouble with code that had to analyze every single element in a branch rather than just the leaves, due to having to add on an extra section on top of the for loop.
I can see how trees can be useful, for creating programs and menus where clicking one item leads to an array of other options, with no overlap between them. However, their usefulness is limited if you need an option that can be accessed through multiple means. Maybe you could use multiple separate trees in that case?
(-o-o-)
(-o-o-)