BUTLAST counts conses before copying whole list
Bug #1245697 reported by
Johan Andersson
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SBCL |
Fix Released
|
Low
|
Unassigned |
Bug Description
BUTLAST counts the conses of the argument list before checking if n is zero, in which case the entire list will be copied. The zerop check can be done before counting the conses, as in NBUTLAST. Also, the similar cases of BUTLAST and NBUTLAST can be made clearer.
Regression tests already exist in tests/list.
Changed in sbcl: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
I'll commit this after the freeze.
Thank you!