[Tutor] Recursion help

Alan Gauld alan.gauld@blueyonder.co.uk
Fri Aug 1 03:09:02 2003


> 
> You can look at it this way:
> printList((1,2,3))
>    prints (1,2,3)[0] which is 1
>    runs printList((1,2,3)[1:]) = printList((2,3))
>    now we're in printList((2,3))
>       prints (2,3)[0] which is 2
>       runs printList((2,3)[1:]) and so on ...
 

Thats a pretty good explanation Zak, mind if I steal it and 
add it to the tutor?

Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld