I have answered this in a previous post
https://groups.google.com/forum/?fromgroups#!searchin/land-of-lisp/purity$20control/land-of-lisp/HtqlXIa6lp8/NcPjx0fcqEAJ
But here is some of the text cut and pasted for you :-
If you think of lisp expressions as ordering in the same way as
complex mathematic expressions this may help you. Whatever a function
returns sits where the function call is.
(defun my-length (list)
(if list
(1+ (my-length (cdr list)))
0))
> (my-length ' (list with four symbols))
becomes
(if '(list with four variables)
which evaluate to true so we operate on the line
(1+ (my-length (cdr list)))
which becomes
(1+ (my-length '(with four varianbles)))
so we get to
(1+ (if '(with four variables)......))
which again evaluates to true so we take the first line
(1+ (1+ (my-length '(four variables))))
which becomes
(1+ (1+ (if '(four variables).....)))
again true so
(1+ (1+ (1+ (my-length '(variables)))))
which becomes
(1+ (1+ (1+ (if ('variables) ....))))
which again avaluates to true so
(1+ (1+ (1+ (1+ (my-length '())))))
which becomes
(1+ (1+ (1+ (1+ (if '() .....)))))
this evaluates to false and so returns the second line which is zero
(1+ (1+ (1+ (1+ 0))))
(1+ (1+ (1+ 1)))
(1+ (1+ 2))
(1+ 3)
4
Hope this makes a bit more sense.