You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
14 lines
315 B
Racket
14 lines
315 B
Racket
#lang racket/base
|
|
(require br/define (for-syntax racket/base))
|
|
(provide (all-defined-out))
|
|
|
|
(define-macro (values->list EXPR)
|
|
#'(call-with-values (λ () EXPR) list))
|
|
|
|
(define-macro (push! ID VAL)
|
|
#'(set! ID (cons VAL ID)))
|
|
|
|
(define-macro (pop! ID)
|
|
#'(let ([x (car ID)])
|
|
(set! ID (cdr ID))
|
|
x)) |