Opened 10 years ago

Closed 10 years ago

#1085 closed defect (fixed)

srfi-1's list= and lset procedures don't check their first arguments

Reported by: evhan Owned by:
Priority: not urgent at all Milestone: 4.10.0
Component: core libraries Version: 4.8.x
Keywords: srfi-1 Cc:
Estimated difficulty:

Description

list=, lset=, lset-union and friends each expect a comparator as the first argument, but nothing bad happens if you don't give one (except some weird results).

(list= '(1) '(2)) ; => #t
(lset= '(1) '(2)) ; => #t
(lset-union '(1) '(2)) ; => (2)
(list= '(1) '(2) '(3)) ; => triggers an error (call of non-procedure: (1))

It seems like these should check the types of their first arguments (which might be as simple as replacing the commented-out check-arg guards from the srfi-1 reference with ##sys#check-closure). On the other hand, some other Schemes (Chibi, Gauche, Racket) do the same thing as we do, currently.

Change History (2)

comment:1 Changed 10 years ago by sjamaan

Milestone: someday4.10.0

Not sure if worth it, but trivial enough to easily get into 4.10.0

comment:2 Changed 10 years ago by sjamaan

Resolution: fixed
Status: newclosed

Fixed by ca281584884f5ab1d5d83e69031b5e61150a42dd (master) and 996b13c0dd045d75dae492e170eaf2e1f66398e4 (chicken-5).

Note: See TracTickets for help on using tickets.