Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
tree: cd423cd8e3
Fetching contributors…

Cannot retrieve contributors at this time

21 lines (17 sloc) 0.38 kb
(define ping-chan (make-chan))
(define pong-chan (make-chan))
(define (ping n)
(if (/= n 0)
(begin
(write (receive ping-chan))
(newline)
(send pong-chan 'pong)
(ping (- n 1)))))
(define (pong n)
(if (/= n 0)
(begin
(send ping-chan 'ping)
(write (receive pong-chan))
(newline)
(pong (- n 1)))))
(go (ping 5) (pong 5))
Jump to Line
Something went wrong with that request. Please try again.