From: Matthias Felleisen (matthias at ccs.neu.edu) Date: Wed May 20 12:41:46 EDT 2009 |
|
Is there a function that computes such lists: > ;; Nat Nat -> [Listof Nat] > (define (range lo hi) > (if (>= hi lo) > (build-list (+ (- hi lo) 1) (lambda (i) (+ lo i))) > (build-list (+ (- lo hi) 1) (lambda (i) (- lo i)))))
Posted on the dev mailing list. |
|