From: Matt Birkholz Date: Wed, 27 Jul 2011 21:19:50 +0000 (-0700) Subject: Use for-each iota; punt dotimes. X-Git-Tag: mit-scheme-pucked-9.2.12~659 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=95472fd844545e9796cdc73c909c47fe3ef567f5;p=mit-scheme.git Use for-each iota; punt dotimes. --- diff --git a/tests/gtk/test-gport-performance.scm b/tests/gtk/test-gport-performance.scm index d57b82704..80e6a7cb9 100644 --- a/tests/gtk/test-gport-performance.scm +++ b/tests/gtk/test-gport-performance.scm @@ -65,15 +65,15 @@ USA. (define (test-io read write) (let ((data (read))) (note " reading") - (dotimes repeats - (lambda (i) - (gc-flip) - (show-time read))) + (for-each (lambda (i) + (gc-flip) + (show-time read)) + (iota repeats)) (note " writing") - (dotimes repeats - (lambda (i) - (gc-flip) - (show-time (lambda () (write data))))) + (for-each (lambda (i) + (gc-flip) + (show-time (lambda () (write data)))) + (iota repeats)) data)) (define (make-read-exprs with-input-port) @@ -157,11 +157,4 @@ USA. (define (note . objects) (write-notification-line (lambda (port) - (for-each (lambda (object) (display object port)) objects)))) - -(define (dotimes n procedure) - (define (loop i) - (if (<= i n) - (begin (procedure i) - (loop (1+ i))))) - (loop 1)) \ No newline at end of file + (for-each (lambda (object) (display object port)) objects)))) \ No newline at end of file