diff --git a/collects/2htdp/batch-io.rkt b/collects/2htdp/batch-io.rkt index bc68ec9903..90a8c5f3a3 100644 --- a/collects/2htdp/batch-io.rkt +++ b/collects/2htdp/batch-io.rkt @@ -77,7 +77,7 @@ (define lines (read-chunks f read-line (lambda (x) x))) (foldl (lambda (f r) (define fst (filter (compose not (curry string=? "")) (split f))) - (if (empty? fst) r (combine fst r))) + (combine fst r)) '() lines)) (def-reader (read-csv-file f) @@ -93,10 +93,9 @@ (define-syntax (simulate-file stx) (syntax-case stx () [(simulate-file) - (raise-syntax-error #f "expects a reader function as first argument" stx)] + (raise-syntax-error #f "expects at least one sub-expression" stx)] [(simulate-file reader str ...) #'(simulate-file/proc (f2h reader) str ...)])) - (define (simulate-file/proc reader . los) (define _1 (check-proc "simulate-file" reader 1 "reader" "one argument")) (define _2 diff --git a/collects/scribblings/reference/filesystem.scrbl b/collects/scribblings/reference/filesystem.scrbl index ce08fc185a..a8cf6efa27 100644 --- a/collects/scribblings/reference/filesystem.scrbl +++ b/collects/scribblings/reference/filesystem.scrbl @@ -111,7 +111,7 @@ by @racket[kind], which must be one of the following: @item{@indexed-racket['exec-file] --- the path of the Racket executable as provided by the operating system for the current - invocation. + invocation. For some operating systems, the path can be relative. @margin-note{For GRacket, the executable path is the name of a GRacket executable.}} diff --git a/collects/teachpack/2htdp/scribblings/batch-io.scrbl b/collects/teachpack/2htdp/scribblings/batch-io.scrbl index 8530ce1833..9563d0ab17 100644 --- a/collects/teachpack/2htdp/scribblings/batch-io.scrbl +++ b/collects/teachpack/2htdp/scribblings/batch-io.scrbl @@ -93,6 +93,7 @@ a part of the separator that surrounds the word @scheme["good"]. ] The results is similar to the one that @scheme[read-words] produces, except that the organization of the file into lines is preserved. +In particular, the empty third line is represented as an empty list of words. } @item{@reading[read-csv-file (listof (listof any/c))]{a list of lists of comma-separated values} diff --git a/collects/teachpack/2htdp/scribblings/data.txt b/collects/teachpack/2htdp/scribblings/data.txt index dda98f1b07..f9f384494e 100644 --- a/collects/teachpack/2htdp/scribblings/data.txt +++ b/collects/teachpack/2htdp/scribblings/data.txt @@ -1,3 +1,4 @@ hello world good bye + i am done