Sunday, 8 February 2015

Impressions of tracing recursion

Tracing code for recursive functions is a very fun thing to do. It's almost like you're working with nesting dolls or peeling layers off of an onion. You pass the argument through the function which refines it a little and passes it again through the function until eventually it hits a stopping point and is able to connect everything together. Tracing it allows you to see how the computer analyzes the function calls. Each call of the function is like another layer being unraveled to try and understand the thing as a whole.

1 comment:

  1. Very insightful, I agree with you're 'connect everything together' point. It just naturally clicks for some people.

    ReplyDelete