Last active
December 16, 2015 01:08
-
-
Save sasaki-shigeo/5352496 to your computer and use it in GitHub Desktop.
How to get EOF object in Scheme (Scheme で EOF オブジェクトを得る方法)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(cond-expand | |
(guile (use-modules (srfi srfi-6))) | |
(gauche (use srfi-6)) | |
(plt (require (lib "6.ss" "srfi"))) | |
(srfi-6 #t)) | |
;;; SRFI-6 provides open-input-string | |
(define *eof* | |
(let ((port (open-input-string ""))) | |
(read port))) | |
(eof-object? *eof*) ; => #t |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment