I'm trying to check if a parameter before use it in a function with racket. This parameter must be a list of lists.
I have tried:
(andmap (lambda (x) (not (and (list? x) (not (pair? x))))) lst)
with:
(define lst '('(a) '(b) '(c)))
But it fails because (pair? '(a))
is true. With pair?
I'm trying to avoid (a . 1)
dotted pairs because (list? (a . 1))
is also true.
How can I check if a list is a list of lists and doesn't contains dotter pairs?