Idiomatic usage of filter, map, build-list and local functions in Racket/Scheme? <p>I'm working through <a href="http://htdp.org/2003-09-26/Book/curriculum-Z-H-27.html#node_sec_21.2" rel="nofollow">Exercise 21.2.3</a> of HtDP on my own and was wondering if this is idiomatic usage of the various functions. This is what I have so far:</p> <pre><code>(define-struct ir (name price)) (define list-of-toys (list (make-ir 'doll 10) (make-ir 'robot 15) (make-ir 'ty 21) (make-ir 'cube 9))) ;; helper function (define (price&lt; p toy) (cond [(&lt; (ir-price toy) p) toy] [else empty])) (define (eliminate-exp ua lot) (cond [(empty? lot) empty] [else (filter ir? (map price&lt; (build-list (length lot) (local ((define (f x) ua)) f)) lot))])) </code></pre> <p>To my novice eyes, that seems pretty ugly because I have to define a local function to get <code>build-list</code> to work, since <code>map</code> requires two lists of equal length. Can this be improved for readability? Thank you.</p>