Wednesday, 4 February 2015

Recursion Tracing

Learning about recursion for the first time last week was quite interesting actually -functions that call themselves? Sounded bizarre at first but with the sum_list function tracing problems practiced in class, it became quite clear how it worked. Tracing with the simple example presented in class was clear and I thought I had a firm grasp on the concept but with some of the functions in lab 3 and the question on today's test, my confidence wavered a bit as it took longer to figure out what the function should do and how much I should unpack it with every line. I do feel my confidence growing again though the more I practice tracing these types on functions. I can see how useful these type of functions would be extremely useful but I can't imagine writing one at this point...

No comments:

Post a Comment