added map to sets

This commit is contained in:
Simon Hafner 2014-02-10 12:44:44 -06:00
commit 0b5c14962e
2 changed files with 17 additions and 0 deletions

13
tests/stdlib/tsets.nim Normal file
View file

@ -0,0 +1,13 @@
discard """
output: '''true'''
"""
import sets
var
a = initSet[int]()
b = initSet[int]()
for i in 0..5: a.incl(i)
for i in 1..6: b.incl(i)
echo map(a, proc(x: int): int = x + 1) == b