title: Functional version of deleting nth element in a list in Racket
body: <p>I want to get a list which has nth version deleted from the original list. I could manage following code which is imperative: </p>
  
  <pre><code>(define (list-removeN slist n)
    (define outl '())
    (for ((i (length slist)))
      (when (not (= i n))
        (set! outl (cons (list-ref slist i) outl))))
    (reverse outl))
  </code></pre>
  
  <p>What can be the functional equivalent of this? I tried for/list, but I have to insert #f or  at that position, removing which is not ideal because #f or  may occur at other positions in list also. </p>