I need to make a function that finds the nth term of a list
Hence (getNth N LS)


Examples of use:
(getNth 0 '(a b c))             ==> a
(getNth 3 '(a b c d e))         ==> d
(getNth 3 '(a b c))             ==> error

so far I have

(define getNth (lambda (N LS)
                   (if (eq? N 0)(car LS)

which only includes the "base case". I need help on how to create this 
function. Any ideas?
____________________
  Racket Users list:
  http://lists.racket-lang.org/users

Reply via email to