static-hash-0.0.0: Immutable hash

Data.StaticHash

Description

Pure immutable hash whose lookup is O(1).

Synopsis

Documentation

data StaticHash k v Source

Data type for immutable hashes.

fromList :: (Eq k, Hashable k) => [(k, v)] -> StaticHash k vSource

Creating StaticHash from a list. A prime around the length of the list x 2 is chosen for the size of array. This may prevent collisions.

lookup :: (Eq k, Hashable k) => k -> StaticHash k v -> Maybe vSource

Looking up StaticHash.