Write the functions initialize, push, top, pop, and list-stack to maintain a global stack. These functions should

Question:

Write the functions initialize, push, top, pop, and list-stack to maintain a global stack.

These functions should behave:

> (initialize)

nil

> (push ’foo)

foo

> (push ’bar)

bar

> (top)

bar

> (list-stack)

(bar foo)

> (pop)

bar

> (list-stack)

(foo)

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Question Posted: