LISP programming

I have a question, and I wonder if anyone can solve this?

Use only the functions car and cdr (and optionally their combinations: cadr, cdar, caddr, etc.) to pick out the X from the list L.

e.g. If L = (a (b X) c) then X = (car (cdr (car (cdr L)))) or (cadr (cadr L)) or (cadadr L)

a: (a b c X d)

b: (((X)))

c: ((a b) c (d X))

d: ((a b) ((c (d a X))))

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!