[Haskell-cafe] Documenting strictness properties for Data.Map.Strict
Johan Tibell
johan.tibell at gmail.com
Fri Nov 18 17:38:37 CET 2011
Here's an attempt at an improved version:
Strictness properties
=====================
This module satisfies the following properties:
1. Key and value arguments are evaluated to WHNF;
2. Keys and values are evaluated to WHNF before they are stored in
the map.
Here are some examples that illustrate the first property:
insertWith (\ old new -> old) k undefined m == undefined
delete undefined m == undefined
Here are some examples that illustrate the second property:
map (\ v -> undefined) m == undefined -- m is not empty
mapKeys (\ k -> undefined) m == undefined -- m is not empty
What do you think?
-- Johan
More information about the Haskell-Cafe
mailing list