From 98e9bc7f9c87fc7a9f91d72756198265bf01facb Mon Sep 17 00:00:00 2001 From: Matthias Felleisen Date: Tue, 30 Sep 2014 09:27:49 -0400 Subject: [PATCH] Racket-y --- pkgs/htdp-pkgs/htdp-lib/2htdp/private/world.rkt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/pkgs/htdp-pkgs/htdp-lib/2htdp/private/world.rkt b/pkgs/htdp-pkgs/htdp-lib/2htdp/private/world.rkt index 333029fb6e..b5a2d69dda 100644 --- a/pkgs/htdp-pkgs/htdp-lib/2htdp/private/world.rkt +++ b/pkgs/htdp-pkgs/htdp-lib/2htdp/private/world.rkt @@ -76,12 +76,8 @@ (define/private (register-with-host) (define FMT "\nworking off-line\n") - (define FMTtry - (string-append "unable to register with ~a after ~s tries" - FMT)) - (define FMTcom - (string-append "unable to register with ~a due to protocol problems" - FMT)) + (define FMTtry (string-append "unable to register with ~a after ~s tries" FMT)) + (define FMTcom (string-append "unable to register with ~a due to protocol problems" FMT)) ;; Input-Port -> [-> Void] ;; create closure (for thread) to receive messages and signal events (define (RECEIVE in) @@ -101,7 +97,7 @@ (define msg (tcp-receive in)) (cond [(sexp? msg) (prec msg) RECEIVE] ;; break loop if EOF - [#t (error 'RECEIVE "sexp expected, received: ~e" msg)]))))))) + [else (error 'RECEIVE "sexp expected, received: ~e" msg)]))))))) RECEIVE) ;; --- now register, obtain connection, and spawn a thread for receiving (parameterize ([current-custodian *rec*])