ashinn / chibi-scheme

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

Incorrect concatenate! definition #933

Closed jvg-upr closed 3 months ago

jvg-upr commented 1 year ago

concatenate! does not behave as specified in SRFI 1. It breaks if the list contains an empty list, except when it's the last element.

(concatenate `(() (1)))
;;; => (1)
(concatenate! `(() (1)))
;;; => ERROR in last-pair on line 58 of file /usr/share/chibi/srfi/1/selectors.scm: cdr: not a pair: ()
ashinn commented 3 months ago

Fixed indirectly in 967b888d8.