schemedoc ow parser

This commit is contained in:
erana 2012-01-17 21:02:38 +09:00
parent 2ca837dc2d
commit df71dd6798
1 changed files with 24 additions and 1 deletions

View File

@ -55,4 +55,27 @@
(do ((e ll (cdr e)))
((null? e)0)
(display (car e) out)))
(display-rec l))))
(display-rec l))))
;;
;; make a list of chars from filename contents
;;
(define (schemedoc-explode-doc filename)
(define (explode in)
(let ((c (read-char in)))
(if (eof-object? c)
c
(append (list c) (explode in)))))
(define (read-rec in)
(call-with-values
(lambda ()
(explode in)
)
(lambda (l)
(display l)
l)))
(let ((in (open-input-file filename)))
(read-rec in)
))