Nested lists in Common Lisp really confused me. Here is the problem:
By using recursion, let (nested-list 'b '(a (b c) d)) return t
if the first argument appears in the second argument (which could be
a nested list), and nil otherwise.
I tried find, but it only works if the first argument is '(b c).
I turned my eyes on lambda expressions. I want to flatten the second
argument first, and then use eq to compare the arguments.
(defun nested-list (x y)
(cond
((null y) ())
(t (append (lambda (flatten) (first y))
Then I got stuck. Even though I read a lot of stuff about lambda expessions, it still confused me. I do not know how to recall it when I need, I knew the funcall function, but you know I just cannot get it. I just learnt Common Lisp for 5 days, so I hope you can give me a hint. Thanks a lot!
tree-contains-p. - Svante