Skip to content

Instantly share code, notes, and snippets.

@sasaki-shigeo
Last active December 16, 2015 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sasaki-shigeo/5352496 to your computer and use it in GitHub Desktop.
Save sasaki-shigeo/5352496 to your computer and use it in GitHub Desktop.
How to get EOF object in Scheme (Scheme で EOF オブジェクトを得る方法)
(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