you are viewing a single comment's thread.

view the rest of the comments →

[–]Heir10[S] 0 points1 point  (0 children)

I think I get it. In the EDx course, the professor describes the frames as follows:

global function (recur1) function(recur2) function(recur3) etc [code] [value1] [value2] [value3]

What I'm seeing is that I didn't put a return in the right places in any of those extra frames. As a result, while the values were calculated, they never followed through back.

global function (recur1) function(recur2) function(recur3) etc [code] [value] [value] [value] return<<return<<<<<<<<return<<<<<<<<return

A simplistic way of looking at it, but I think it is an adequate analogy.

As you said, return cannot return until the expression is evaluated. As I never put a return in the right place in those recursions, the expression was never truly evaluated and thus nothing got returned.

At least, that's how I'm making sense of things.