Merge branch 'devel' of https://github.com/Araq/Nimrod into devel

This commit is contained in:
Araq 2014-02-13 21:30:11 +01:00
commit 5d4c048705
10 changed files with 115 additions and 31 deletions

View file

@ -241,3 +241,7 @@ proc `<=`*[A](s, t: TSet[A]): bool =
proc `==`*[A](s, t: TSet[A]): bool =
s.counter == t.counter and s <= t
proc map*[A, B](data: TSet[A], op: proc (x: A): B {.closure.}): TSet[B] =
result = initSet[B]()
for item in data: result.incl(op(item))