I have a stack procedure which is designed in a object oriented programming paradigm, one of the nested procedures in my stack is a print. Since my stack is literally a list I can easily print it by just calling the global variable my-stack but I don't want to print it as a list, I would like to print it as a stack one thing on top of the other, is there a way?
(define (print)
(define (print-helper stack)
(if (empty?)'()
(print-helper (cdr stack))
))
(print-helper my-stack))