From 6622d3ae2c016d487ed16e0d80c98e0ab9ea3e0a Mon Sep 17 00:00:00 2001 From: Matthew Butterick Date: Sat, 22 Dec 2018 23:24:09 -0800 Subject: [PATCH] tidier --- pitfall/pitfall/reference.rkt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pitfall/pitfall/reference.rkt b/pitfall/pitfall/reference.rkt index aef97e89..087e88cf 100644 --- a/pitfall/pitfall/reference.rkt +++ b/pitfall/pitfall/reference.rkt @@ -29,8 +29,10 @@ (set! current-id val)) (define (make-ref [payload (make-hasheq)]) + (define new-ref (make-object PDFReference current-id payload)) + (for-each (λ (listener-proc) (listener-proc new-ref)) ref-listeners) (begin0 - (make-object PDFReference current-id payload) + new-ref (set! current-id (add1 current-id)))) (define PDFReference @@ -41,8 +43,6 @@ (field [(@offset offset) #f] [@port (open-output-bytes)]) - (for-each (λ (listener-proc) (listener-proc this)) ref-listeners) - (define/public (write x) (write-bytes (to-bytes x) @port))