correct behaviour of nconc
Posted: Fri Jul 24, 2015 5:44 am
Hi guys,
I'm currently implementing my own lisp interpreter. At the moment I working on the function nconc. I'm not sure how it should behave for the following cases:
or
The gnu common lisp compiler returns 1 for both cases. Shouldn't the return value be a list. Isn't throwing an exception the better behaviour? Or is this behaviour forced by the standard?
regards,
Martin Kalbfuß
I'm currently implementing my own lisp interpreter. At the moment I working on the function nconc. I'm not sure how it should behave for the following cases:
Code: Select all
(nconc 1)Code: Select all
(nconc nil 1)regards,
Martin Kalbfuß