Merge pull request #418 from fowlmouth/patch-5

add hashing for seqs
This commit is contained in:
Araq
2013-05-08 16:12:33 -07:00

View File

@@ -126,3 +126,6 @@ proc hash*(x: float): THash {.inline.} =
var y = x + 1.0
result = cast[ptr THash](addr(y))[]
proc hash*[A](x: openarray[A]): THash =
for it in items(x): result = result !& hash(it)
result = !$result