added 'hash' for set[T]'

This commit is contained in:
Andreas Rumpf 2014-04-13 00:32:10 +02:00
commit f862e80be9

View file

@ -129,3 +129,7 @@ proc hash*(x: float): THash {.inline.} =
proc hash*[A](x: openArray[A]): THash = proc hash*[A](x: openArray[A]): THash =
for it in items(x): result = result !& hash(it) for it in items(x): result = result !& hash(it)
result = !$result result = !$result
proc hash*[A](x: set[A]): THash =
for it in items(x): result = result !& hash(it)
result = !$result