Skip to content

Instantly share code, notes, and snippets.

@SaitoAtsushi
Created February 18, 2014 06:22
Show Gist options
  • Save SaitoAtsushi/9065569 to your computer and use it in GitHub Desktop.
Save SaitoAtsushi/9065569 to your computer and use it in GitHub Desktop.
カスタムポートを通じて脱出。
#!r6rs
(import (rnrs))
(define (test)
(call/cc
(lambda(cc)
(let ((in (make-custom-binary-input-port "consumer" cc #f #f #f)))
(get-u8 in)))))
(define (print . x) (for-each (lambda(x)(write x)(newline)) x))
(call-with-values test print)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment