Welcome to the CHICKEN Scheme pasting service

james27 notes on off added by evhan on Fri Mar 18 04:16:41 2016

(require-extension srfi-18)

(define (p note time)
  (display note)
  (display " - ")
  (display "ON!\n")
  (thread-sleep! time)
  (display note)
  (display " - ")
  (display "OFF!\n"))
 
(define (two p1 p2)
  (let ((t1 (make-thread p1))
        (t2 (make-thread p2)))
    (begin
      (thread-start! t1)
      (thread-start! t2)
      (thread-join! t1)
      (thread-join! t2))))

(two (lambda () (p 60 2))
     (lambda () (p 67 3)))

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `string-intersperse'?
Visually impaired? Let me spell it for you (wav file) download WAV