Created
June 8, 2019 02:32
-
-
Save 9999years/a3014a8a9d794760ffa73700da9608ea to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang r5rs | |
(define-syntax push! | |
(syntax-rules (push!) | |
((push! x s) | |
(set! s (cons x s))))) | |
(define-syntax pop! | |
(syntax-rules (pop!) | |
((pop! s) | |
(let ((t (car s))) | |
(set! s (cdr s)) | |
t)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment