Friday, February 6, 2015

Week 5

   In these 2 weeks, I have learned about recursions. The first impression of recursion is not so positive as I am scared by the concept of using the function itself within the implementation of that function, which seems complicated. But as the professor shows us the whole method of how to trace recursion, it becomes more clear and straight forward to me. Recursion is somehow like a loop; it can give us the result of each simplest element within the nested list directly, and then break the nests while using that method directly. Thus, tracing recursions will be easy as long as I understand the body of the function.
   However, in week4's lab, there is a part that requires us to write the body of the function based on the examples using recursions. I spend about half of an hour to work that out. Now I understand that writing a recursion function is way more difficult than just tracing it. Hopefully I can find a way to solve this problem in the next lectures.

No comments:

Post a Comment