summary refs log tree commit diff stats
path: root/lib/pure/collections/tables.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2014-06-12 16:39:20 +0200
committerAndreas Rumpf <rumpf_a@web.de>2014-06-12 16:39:20 +0200
commitd927eb5854e9c6c005344bc81d4632ffc8f5d975 (patch)
tree145a26a74dd4b93f67f5a1ae70602133df12960d /lib/pure/collections/tables.nim
parentd3c8f1ab25a810516baccc2b1bff761dbbc2d011 (diff)
parentaf6abac4911be18bd92a9190ccbe39aa72ab1a79 (diff)
downloadNim-d927eb5854e9c6c005344bc81d4632ffc8f5d975.tar.gz
Merge pull request #1251 from gradha/pr_misc_docs
Misc docs suggestions
Diffstat (limited to 'lib/pure/collections/tables.nim')
-rw-r--r--lib/pure/collections/tables.nim6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/pure/collections/tables.nim b/lib/pure/collections/tables.nim
index 091bf8590..ce9df09e1 100644
--- a/lib/pure/collections/tables.nim
+++ b/lib/pure/collections/tables.nim
@@ -37,7 +37,8 @@
 ##     ## Piggyback on the already available string hash proc.
 ##     ##
 ##     ## Without this proc nothing works!
-##     result = hash(x.firstName & x.lastName)
+##     result = x.firstName.hash !& x.lastName.hash
+##     result = !$result
 ##
 ##   var
 ##     salaries = initTable[Person, int]()
@@ -848,7 +849,8 @@ when isMainModule:
     ## Piggyback on the already available string hash proc.
     ##
     ## Without this proc nothing works!
-    result = hash(x.firstName & x.lastName)
+    result = x.firstName.hash !& x.lastName.hash
+    result = !$result
 
   var
     salaries = initTable[Person, int]()