diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/hashes.nim | 4 |
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 |