Closed jpellegrini closed 2 weeks ago
The reference (sample) implementation had a bug that reversed the arguments to =. The implementation has been corrected to match the SRFI text, and we do so in STklos also.
See: https://srfi.schemers.org/srfi-1/srfi-1.html#lset%3D-element-equality-order
The difference in behavior is only for side-effects. It can be seen in this example:
;; OLD version of lset= scheme/list> (lset= (lambda (x y) (print x) (= x y)) '(1 2 ) '(1 2 )) 1 2 2 1 2 ;; <= HERE! 2 ;; NEW version of lset= scheme/list> (lset=-new (lambda (x y) (print x) (= x y)) '(1 2 ) '(1 2 )) 1 2 2 1 1 ;; <= HERE! 2
Thanks for your vigilance @jpellegini. Merged
The reference (sample) implementation had a bug that reversed the arguments to =. The implementation has been corrected to match the SRFI text, and we do so in STklos also.
See: https://srfi.schemers.org/srfi-1/srfi-1.html#lset%3D-element-equality-order
The difference in behavior is only for side-effects. It can be seen in this example: