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.
18 lines
447 B
Racket
18 lines
447 B
Racket
#lang br/quicklang
|
|
(provide + *)
|
|
|
|
(define-macro (stackerizer-mb EXPR ...)
|
|
#'(#%module-begin
|
|
(for-each displayln
|
|
(reverse (flatten (list EXPR ...))))))
|
|
(provide (rename-out [stackerizer-mb #%module-begin]))
|
|
|
|
(define-macro (define-ops OP ...)
|
|
#'(begin
|
|
(define-macro-cases OP
|
|
[(OP FIRST) #'FIRST]
|
|
[(OP FIRST NEXT (... ...))
|
|
#'(list 'OP FIRST (OP NEXT (... ...)))])
|
|
...))
|
|
|
|
(define-ops + *) |