Why does SBCL bail out in case of symbol list in lambda expression?
Hello,
SBCL bails out with the following source code
(defun bad-ingredients (order)
(mapcan (lambda (burger)
(case burger
order))
if called e.g. via (bad-ingredients '(single single)), i.e. I have to interrupt execution, since it never comes to an end!
On the other hand, the following works without problems:
(defun ingredients (order)
(mapcan (lambda (burger)
(case burger
order))
But why doesn't "bad-ingredients" work as expected? Why is the result an endless loop?
Is it because it creates and returns locally bound symbols?
Is this a bug or is the behavior just undefined?
Kind regards
Michael
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SBCL Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Nikodemus Siivola
- Solved:
- Last query:
- Last reply: