How do I call vectorp and aref twice in a cond statement
Posted: Fri May 09, 2014 12:28 am
;I got this whittled down as much as I can...for some reason I cant call (aref arg i) in a cond statement twice in a row. I do have to verify it is a vector 2 different ways, before I run (aref arg 0) and (aref arg i) as below...How can I do this?...I'm getting deleting unreachable code error.
Code: Select all
(defun vector-test (&optional arg i)
(cond ((vectorp arg) (aref arg 0))
((and (vectorp arg) i) (aref arg i))))