mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 05:50:30 +00:00
Address Andreas' complaint about code duplication.
This commit is contained in:
@@ -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`.
|
||||
|
||||
Reference in New Issue
Block a user