robby
2018-3-15 21:13:44

I can’t remember exactly the details anymore, but, IMO, sets are broken in various ways


robby
2018-3-15 21:14:15

Ah, right: they are generic and don’t work the way other structures work (like maps).


robby
2018-3-15 21:14:41

I complained about this but too little and too late (and I didn’t do more than just complain, which isn’t helpful)


robby
2018-3-15 21:15:02

I think that the way lists are treated like sets is particularly problematic.


robby
2018-3-15 21:15:24

eg:


robby
2018-3-15 21:15:26
Welcome to Racket v6.90.0.19.
> (set? (list 1 2 3))
#f
> (set-union (list 1 2 3) (list 4 5 6))
'(6 5 4 1 2 3)
>

robby
2018-3-15 21:17:26

set-union works on generic-set?s — this is a backwards compatibility compromise