added 'hash' for set[T]'

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

View File

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