projects
/
haskell-directory.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fa636af
)
[project @ 2003-04-17 13:26:59 by simonmar]
author
simonmar
<unknown>
Thu, 17 Apr 2003 13:26:59 +0000
(13:26 +0000)
committer
simonmar
<unknown>
Thu, 17 Apr 2003 13:26:59 +0000
(13:26 +0000)
Doc wibbles
Data/HashTable.hs
patch
|
blob
|
history
diff --git
a/Data/HashTable.hs
b/Data/HashTable.hs
index
5211f90
..
917daab
100644
(file)
--- a/
Data/HashTable.hs
+++ b/
Data/HashTable.hs
@@
-101,7
+101,7
@@
data HashTable key val
--
-- This implementation of hash tables uses the low-order /n/ bits of the hash
-- value for a key, where /n/ varies as the hash table grows. A good hash
--
-- This implementation of hash tables uses the low-order /n/ bits of the hash
-- value for a key, where /n/ varies as the hash table grows. A good hash
--- function therefore will give a good distribution regardless of /n/.
+-- function therefore will give an even distribution regardless of /n/.
--
-- If your keyspace is integrals such that the low-order bits between
-- keys are highly variable, then you could get away with using 'id'
--
-- If your keyspace is integrals such that the low-order bits between
-- keys are highly variable, then you could get away with using 'id'
@@
-117,7
+117,7
@@
data HashTable key val
hashInt :: Int -> Int32
hashInt = (`rem` prime) . fromIntegral
hashInt :: Int -> Int32
hashInt = (`rem` prime) . fromIntegral
--- | A sample hash fucntion for 'String's. The implementation is:
+-- | A sample hash function for 'String's. The implementation is:
--
-- > hashString = fromIntegral . foldr f 0
-- > where f c m = ord c + (m * 128) `rem` 1500007
--
-- > hashString = fromIntegral . foldr f 0
-- > where f c m = ord c + (m * 128) `rem` 1500007