From 975290d0c1c31255067b7641848f3f95b37523f3 Mon Sep 17 00:00:00 2001 From: Eli Barzilay Date: Sat, 8 Mar 2008 07:03:40 +0000 Subject: [PATCH] use flatten from scheme/list svn: r8927 --- .../examples/interlocking-components.scm | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/collects/slideshow/examples/interlocking-components.scm b/collects/slideshow/examples/interlocking-components.scm index ced6610bd0..3968d039ca 100644 --- a/collects/slideshow/examples/interlocking-components.scm +++ b/collects/slideshow/examples/interlocking-components.scm @@ -1,7 +1,8 @@ (module interlocking-components slideshow/run (require mzlib/class - mred) + mred + scheme/list) (define-struct posn (x y) (make-inspector)) @@ -243,19 +244,10 @@ (+ pointy-tooth-accept-space pointy-tooth-width) pointy-tooth-width) 0))) - + (define (offset-posns x y posns) (map (lambda (pt) (make-posn (+ x (posn-x pt)) (+ y (posn-y pt)))) posns)) - - (define (flatten orig-sexp) - (let loop ([sexp orig-sexp] - [acc null]) - (cond - [(null? sexp) acc] - [(pair? sexp) - (loop (car sexp) (loop (cdr sexp) acc))] - [else (cons sexp acc)]))) - + (define (overlay-striped-background color diameter pict) (let* ([w (pict-width pict)] [h (pict-height pict)]