Use fromList instead of reimplementing it in terms of foldl

This commit is contained in:
Joseph C. Sible
2024-07-07 01:11:00 -04:00
parent 95c0cc2e4b
commit 98b8dc0720
2 changed files with 5 additions and 17 deletions

View File

@@ -1286,7 +1286,7 @@ dataflow ctx entry = do
else do
let (next, rest) = S.deleteFindMin ps
nexts <- process states next
writeSTRef pending $ foldl (flip S.insert) rest nexts
writeSTRef pending $ S.union (S.fromList nexts) rest
f (n-1) pending states
process states node = do