I have something like this
(map (lambda (l) (apply + l)) '('(1 2) '(3 4)))
I expect '(3 7)
, however I get an error saying that the applied function gets applied to a quote.
Why does this happen?
I have something like this
(map (lambda (l) (apply + l)) '('(1 2) '(3 4)))
I expect '(3 7)
, however I get an error saying that the applied function gets applied to a quote.
Why does this happen?
The list I had was equivalent to
(list (quote (list 1 2)) (quote (list 3 4)))
and not
(list (list 1 2) (list 3 4))
The list was malformed. For the difference between list and quote see this post: What is the difference between quote and list?.
A proper way to do nested loop is like '((1 2) (3 4))
.