Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define display1 null)
- (define (make-stack)
- (set! make-stack null))
- (define (push n stack)
- (set! make-stack (append (list n) make-stack)))
- (define (pop stack)
- (if (null? make-stack)
- "Stack empty!"
- (begin (set! display1 (car make-stack))
- (set! make-stack (cdr make-stack))
- display1)))
Advertisement
Add Comment
Please, Sign In to add comment