Merge remote branch 'origin'
This commit is contained in:
commit
15ea740fa3
|
@ -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
|
||||
|
|
|
@ -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.}}
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
hello world
|
||||
good bye
|
||||
|
||||
i am done
|
||||
|
|
Loading…
Reference in New Issue
Block a user