Data.Set's difference introduces duplicate values
In this MWE, the result is [-1,0,0,2,3]
while this should of course be [-1,0,2,3]
because a Set
should not include duplicate values.
The error is introduced by difference
.
import StdInt
import Data.Set
Start = toList (difference (fromList [2,3,-1,0]) (singleton 1))