What would be meant by deleting all occurrences of an element from a list at the top-level?
an example:
(del '(a b c) '(a (b c) (a b c) (d (a b c) e) (a c) (a b c) (r (a b c)))
Would any of the (a b c) occurrences be deleted?
I am not sure what top-level means.
top level delete?
Re: top level delete?
Probably what is meant is the ones caught when you #'eql them iterating the first list, and not the lists within. So the result for your example would be just the first a removed of the second argument. (Assuming the first list is the ones that have to be deleted and the second the list to delete from)
You can write it using #'delete-if, with predicate being whether it is in list of things you want to delete. Or you can use #'loop/#'iter and collect those you do not want deleted.
You can write it using #'delete-if, with predicate being whether it is in list of things you want to delete. Or you can use #'loop/#'iter and collect those you do not want deleted.
Re: top level delete?
AFAIK 'top level' refers to the REPL, the read eval print loop. This is the command prompt you see for the lisp image. So doing something at the 'top-level' means doing it at the lisp command prompt. This sounds like an exercise to practice using car and cdr interactively.