Just curious why you would use that imperative example with Racket, and not an imperative language like Python, or even Haskell?  You parenthetically mention (match) (ha!) but to someone who doesn&#x27;t know the languages, give the impression that Racket can&#x27;t do pattern matching.<p>Anyway, this is the analogous `map` in racket:<p><pre><code>    (define (my-map f lst)
      (match lst
        [&#x27;()            &#x27;()]
        [(cons hd tl)    (cons (f hd) (my-map f tl))]))
</code></pre>
It&#x27;s a 1-to-1 correspondence, and is arguably the idiomatic way to define `map` in Racket.