Recursion using lists

this is an example of how to use lists as stacks and how recursion works