Skip to content

Commit

Permalink
Racket-y
Browse files Browse the repository at this point in the history
  • Loading branch information
mfelleisen committed Oct 2, 2014
1 parent 0c633d9 commit 98e9bc7
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions pkgs/htdp-pkgs/htdp-lib/2htdp/private/world.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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*])
Expand Down

0 comments on commit 98e9bc7

Please sign in to comment.