From 5ff521c7eecd47b18d1092fc4c7a7a11627be528 Mon Sep 17 00:00:00 2001 From: u6001 Date: Thu, 11 Jun 1992 17:31:22 +0000 Subject: [PATCH] still changing to deal with new representation of pictures --- v7/src/6001/picture.scm | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/v7/src/6001/picture.scm b/v7/src/6001/picture.scm index 689a22b1a..efb32ac16 100644 --- a/v7/src/6001/picture.scm +++ b/v7/src/6001/picture.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/6001/picture.scm,v 1.11 1992/06/08 18:17:14 aragorn Exp $ +$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/6001/picture.scm,v 1.12 1992/06/11 17:31:22 u6001 Exp $ Copyright (c) 1991-92 Massachusetts Institute of Technology @@ -334,5 +334,24 @@ MIT in each case. |# 'done (let ((rowvals (map char-function - (vector->list (vector-ref data row))))) + (floating-vector->list (vector-ref data row))))) (begin (write-string (list->string rowvals) port) + (rowloop (- row 1))))))))))) + + +(define (floating-vector->list vector) + (generate-list (floating-vector-length vector) + (lambda (i) + (floating-vector-ref vector i)))) + + +(define (generate-list n proc) ; ==> ( (proc 0) (proc 1) ... (proc n-1) ) + (let loop ((i (- n 1)) (list '())) + (if (< i 0) + list + (loop (- i 1) (cons (proc i) list))))) + + + + + -- 2.25.1