Address Andreas' complaint about code duplication.
This commit is contained in:
parent
11e7c4960e
commit
1f3ce26421
1 changed files with 3 additions and 2 deletions
|
|
@ -246,8 +246,9 @@ proc incl*[A](s: var HashSet[A], other: HashSet[A]) =
|
|||
for item in other: incl(s, item)
|
||||
|
||||
template doWhile(a: expr, b: stmt): stmt =
|
||||
b
|
||||
while a: b
|
||||
while true:
|
||||
b
|
||||
if not a: break
|
||||
|
||||
proc excl*[A](s: var HashSet[A], key: A) =
|
||||
## Excludes `key` from the set `s`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue