nuntius wrote:This might give you some ideas.
- Code: Select all
(let ((db '((1 2) (1 2 3 4))))
(dolist (data db)
(print (loop for x in data by #'cddr
collecting x))))
(let ((db '((1 2) (1 2 3 4))))
(getf (cadr db) 3))
(let ((db '((1 2) (1 2 3 4))))
(dolist (data db)
(print (loop for (key . val) on data by #'cddr
collecting key))))
Thanks for the help. The only one I could 'understand' is the getf. The other 2 I had a hard time understanding.
So i am looping in the dolist to get all of the first list. Then i need to print a loop that gets the data from the key question?
I get an error saying "Car: :question is not a list." I thought question would be hidden and the data would 'overlay' that key.
Any functions I should look up? getf was a good start.
best i have so far is:
- Code: Select all
(dolist (data (car *db*))
(print (get 'data ':question)))
That prints out NIL and not the question