Hacker News
new
past
comments
ask
show
jobs
points
by
tubs
12 hours ago
|
comments
by
willybrauner
12 hours ago
|
next
[-]
I create a new copy of the Set because the functions called during the loop might modify it by removing elements via cleanup functions. Without a copy, iterating directly on the Set could cause unpredictable behavior.
reply
by
willybrauner
12 hours ago
|
prev
|
[-]
But as the article points out, this is a naive implementation. It could be discussed and greatly improved.
reply
by
4 hours ago
|
parent
|
[-]
deleted
reply