ashinn / chibi-scheme

Official chibi-scheme repository
Other
1.2k stars 142 forks source link

SRFI-1 `append!` and `append` not equivalent #944

Closed ekaitz-zarraga closed 6 months ago

ekaitz-zarraga commented 6 months ago

Hi,

I noticed append! doesn't work when the first list is empty and that is not equivalent to what append does, which just works.

I think there's some bug in append!'s implementation, that relies on the first element having a cdr which it may not have.

I'll try to find a fix and propose it.

Thanks!

ekaitz-zarraga commented 6 months ago

So, digging in the code append! is calling concatenate! which also has the same issue.