Data.HashMap: Strict or lazy by default?
Jan-Willem Maessen
jmaessen at alum.mit.edu
Fri Feb 18 04:06:30 CET 2011
NB I believe that it is possible to make a lazy-valued Map (IntMap,
HashMap, etc...) from a strict one via:
data Lazy a = Lazy a
newtype LazyMap k v = StrictMap k (Lazy v)
So in principle (and I believe this is only useful for key-strict
structures) the strict map is more "universal". A separate lazy
implementation mostly saves us a layer of indirection.
-Jan-Willem Maessen
More information about the Libraries
mailing list