summary refs log tree commit diff stats
path: root/lib
diff options
context:
space:
mode:
authorAndreas Rumpf <ar@kimeta.de>2014-04-13 00:32:10 +0200
committerAndreas Rumpf <ar@kimeta.de>2014-04-13 00:32:10 +0200
commitf862e80be96289ad0f54c1d73a3e32734ed48cc3 (patch)
treece68b9aaac0d4cf47e514f8758f3bfd8a62b506d /lib
parent3ee25170c3456640253b1d6ea7ffaaf3de88478f (diff)
downloadNim-f862e80be96289ad0f54c1d73a3e32734ed48cc3.tar.gz
added 'hash' for set[T]'
Diffstat (limited to 'lib')
-rw-r--r--lib/pure/hashes.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/hashes.nim b/lib/pure/hashes.nim
index ee05ad7e2..5784a96c1 100644
--- a/lib/pure/hashes.nim
+++ b/lib/pure/hashes.nim
@@ -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