From 90b8680bd7d5a3f4038faeb16897c9bc05dd5bcc Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sun, 10 Jul 2016 15:22:43 -0700 Subject: [PATCH] compress --- beautiful-racket/br/demo/stacker3.rkt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/beautiful-racket/br/demo/stacker3.rkt b/beautiful-racket/br/demo/stacker3.rkt index d589234..9fbbc30 100644 --- a/beautiful-racket/br/demo/stacker3.rkt +++ b/beautiful-racket/br/demo/stacker3.rkt @@ -1,22 +1,23 @@ #lang br/quicklang -(provide read-syntax (rename-out [stacker-module-begin #%module-begin]) + *) +(provide read-syntax + (rename-out [stacker-module-begin #%module-begin]) + + *) (define (read-syntax path port) - (strip-context - #`(module stacker3-mod br/demo/stacker3 - #,@(port->list read port)))) + (datum->syntax #f + `(module stacker3-mod br/demo/stacker3 + ,@(port->list read port)))) (define-macro (stacker-module-begin ARG ...) #'(#%module-begin (display (first (foldl - (λ(x xs) + (λ (x xs) (if (number? x) (cons x xs) (cons (x (car xs) (cadr xs)) (cddr xs)))) null (list ARG ...)))))) - (module+ test (require rackunit) (check-equal? (with-output-to-string (λ () (dynamic-require "stacker3-test.rkt" #f))) "36")) \ No newline at end of file