[plt-scheme] horay(?) to me!
Ok, so many people here have been doing this a long time.
I'm starting to understand scheme, loops, and quasiquoting.
For no practical purpose at all I submit the following.
Mike
(let loop ((running #t))
(let ((r (random 20)))
(set! running (< r 17))
(printf "r=~a running=~a~%" (number->string r) (if running "true" "false"))
(printf "thread=~a~%"
(thread
(eval
`(lambda () (sleep (random 4)) (printf "thread count=~a~%" ,r)))))
;(sleep 2)
(if running
(begin
;(sleep 2)
(loop running)))))