Skip to content

Instantly share code, notes, and snippets.

Created Jun 14, 2020
What would you like to do?
(use data.queue)
(use gauche.partcont)
(define queue (make-queue))
(define (yield)
(shift cont
(enqueue! queue cont)))
(define (main args)
(enqueue! queue (lambda ()
(guard (e (else (print "catch error!!")))
(error "err"))))
(while (dequeue! queue #f)
=> next
(print "==> call next")
(lambda ()
(print "start"))
(lambda ()
(lambda ()
(print "end"))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment