As a mere lamb, finding my CS feet...
(defun has-list (lst)
(if (null lst)
nil
(if (listp (car lst))
T
(has-list (cdr lst)))))
And today...
(defun has-list (lst)
(and (not (null lst))
(or (listp (car lst))
(has-list (cdr lst)))))
Let me explain:
I've just moved house. Ok, by just I mean 3 months ago! I haven't unpacked too much which tells me two things: a) I have a bunch of crap I don't need, and b) turns out there is no valid point b).
So in what little unpacking I have done, I found an old notebook from way back to when I took Ann Nicholson's IA course as an undergraduate. ASNI Common Lisp by Paul Graham was one of the required texts. (My memory is a little sketchy, but I think it was during that course that I first came across PG). Anyway, the old notebook also contains my answers to the end of chapter questions.
Reading your old code is a humbling, but fascinating experience.

Feed
Comments 1
I have watched you embark a boat with over a week's worth of provisions, and then promptly fall asleep for 7 days and 7 nights all while holding a half full beer.....
....the point is that 3 mths is nothing for unpacking for you my friend.
Posted June 19, 2008 at 1:31 a.m. ¶Comments are now closed.