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)
|
for item in other: incl(s, item)
|
||||||
|
|
||||||
template doWhile(a: expr, b: stmt): stmt =
|
template doWhile(a: expr, b: stmt): stmt =
|
||||||
b
|
while true:
|
||||||
while a: b
|
b
|
||||||
|
if not a: break
|
||||||
|
|
||||||
proc excl*[A](s: var HashSet[A], key: A) =
|
proc excl*[A](s: var HashSet[A], key: A) =
|
||||||
## Excludes `key` from the set `s`.
|
## Excludes `key` from the set `s`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue