SHARE
TWEET

Untitled

a guest Dec 5th, 2019 86 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (define festiveMessage "Happy Holidays")
  2. (define counter 0)
  3.  
  4. (define (make-thread-thunk name)
  5.   (letrec ((loop (lambda ()
  6.                    (if (> counter (-(string-length festiveMessage) 1))
  7.                        (quit))
  8.                    (display "in thread ")
  9.                    (display name)
  10.                    (display "; Festive Message string reference = ")
  11.                    (display (string-ref festiveMessage counter))
  12.                    (newline)
  13.                    (set! counter (+ counter 1))
  14.                    (yield)
  15.                    (loop))))
  16.     loop))
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top