[plt-dev] make-list

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Sat May 23 21:16:40 EDT 2009

Yet another use:

#lang scheme

;; Nat -> Pict
;; create a numberline with n dashes
(define (numberline n)
   (define h1 20)
   (define w1 20)
   (define (one i) (cc-superimpose (blank w1 h1) (text (number- 
 >string i))))
   (define mmm (apply hc-append (make-list n (vline w1 h1))))
   (define kkk (apply hc-append (build-list n one)))
   (define lnn (hline (* w1 n) h1))
   (define img (vc-append (cc-superimpose mmm lnn) kkk))
   (pin-arrow-line 3.0 img lnn lc-find lnn rc-find))

(numberline 21)

Posted on the dev mailing list.