tony
tony

Reputation: 27

Weird common lisp error (sbcl)

I am having a really wierd lisp error. I am using sbcl and have written the following code. I am just hoping someone could explain.

(setq x '((1 (x y) (1 2)) (3 (x z) (2 3)) (3 (x y) (1 2)) (4 (x y) (1 2))))

(caddadr x)

gives the following error message

; Evaluation aborted on #.

however writing it in the for gives me what I was expecting which is

(car (cddadr x))
(2 3)

just wondering why this is to be honest.

Upvotes: 0

Views: 131

Answers (1)

sheikh_anton
sheikh_anton

Reputation: 3452

There is no such function as caddadr, that's why.

* (fboundp 'caddadr)

NIL
* (fboundp 'cddadr)

T

You have just CAR, CDR, CAAR, CADR, CDAR, CDDR, CAAAR, CAADR, CADAR, CADDR, CDAAR, CDADR, CDDAR, CDDDR, CAAAAR, CAAADR, CAADAR, CAADDR, CADAAR, CADADR, CADDAR, CADDDR, CDAAAR, CDAADR, CDADAR, CDADDR, CDDAAR, CDDADR, CDDDAR and CDDDDR. See: http://clhs.lisp.se/Body/f_car_c.htm

Upvotes: 2

Related Questions