moved get-lines to common.scm
This commit is contained in:
1 parent
bdc9004df6
commit
0388455b85
2 files changed
+8
-6
No files matched your search
@@ -1,9 +1,4 @@
|
|||||||
; get list of lines from a file
|
(load "../common.scm")
|
||||||
(define (get-lines file)
|
|
||||||
(let loop [(lines '())]
|
|
||||||
(if (eof-object? (peek-char file))
|
|
||||||
lines
|
|
||||||
(loop (cons (get-line file) lines)))))
|
|
||||||
|
|
||||||
; check if character can close chunk
|
; check if character can close chunk
|
||||||
(define (closing? c)
|
(define (closing? c)
|
||||||
|
|||||||
@@ -1,5 +1,12 @@
|
|||||||
(import (srfi :43)) ; vector extensions
|
(import (srfi :43)) ; vector extensions
|
||||||
|
|
||||||
|
; get list of lines from a file
|
||||||
|
(define (get-lines file)
|
||||||
|
(let loop [(lines '())]
|
||||||
|
(if (eof-object? (peek-char file))
|
||||||
|
lines
|
||||||
|
(loop (cons (get-line file) lines)))))
|
||||||
|
|
||||||
; returns a list of numbers parsed from the first line of the file,
|
; returns a list of numbers parsed from the first line of the file,
|
||||||
; separated by commas
|
; separated by commas
|
||||||
(define (read-comma-separated-numbers file)
|
(define (read-comma-separated-numbers file)
|
||||||
|
|||||||
Reference in new issue
Block a user