diff options
Diffstat (limited to 'ice-9/arrays.scm')
-rw-r--r-- | ice-9/arrays.scm | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/ice-9/arrays.scm b/ice-9/arrays.scm index 87c70fb88..eb7a90f86 100644 --- a/ice-9/arrays.scm +++ b/ice-9/arrays.scm @@ -35,43 +35,3 @@ (define (array-shape a) (map (lambda (ind) (if (number? ind) (list 0 (+ -1 ind)) ind)) (array-dimensions a))) - -; (let ((make-array-proc (lambda (template) -; (lambda (c port) -; (read:uniform-vector template port))))) -; (for-each (lambda (char template) -; (read-hash-extend char -; (make-array-proc template))) -; '(#\a #\u #\e #\s #\i #\c #\y #\h #\l) -; '(#\a 1 -1 1.0 1/3 0+i #\nul s l))) - -; (let ((array-proc (lambda (c port) -; (read:array c port)))) -; (for-each (lambda (char) (read-hash-extend char array-proc)) -; '(#\0 #\1 #\2 #\3 #\4 #\5 #\6 #\7 #\8 #\9))) - -(define (read:array digit port) - (define chr0 (char->integer #\0)) - (let ((rank (let readnum ((val (- (char->integer digit) chr0))) - (if (char-numeric? (peek-char port)) - (readnum (+ (* 10 val) - (- (char->integer (read-char port)) chr0))) - val))) - (prot (if (eq? #\( (peek-char port)) - '() - (let ((c (read-char port))) - (case c ((#\b) #t) - ((#\a) #\a) - ((#\u) 1) - ((#\e) -1) - ((#\s) 1.0) - ((#\i) 1/3) - ((#\c) 0+i) - (else (error "read:array unknown option " c))))))) - (if (eq? (peek-char port) #\() - (list->uniform-array rank prot (read port)) - (error "read:array list not found")))) - -(define (read:uniform-vector proto port) - (if (eq? #\( (peek-char port)) - (list->uniform-array 1 proto (read port)))) |