[project @ 2002-06-13 10:41:31 by simonmar]
authorsimonmar <unknown>
Thu, 13 Jun 2002 10:41:31 +0000 (10:41 +0000)
committersimonmar <unknown>
Thu, 13 Jun 2002 10:41:31 +0000 (10:41 +0000)
Some extra docs, from Jon Fairbairn

Data/FiniteMap.hs

index 244b811..1a08cae 100644 (file)
@@ -210,8 +210,21 @@ lookupWithDefaultFM
                -- to return for an unmapped key
 
 --     LISTIFYING
+
+-- | Convert a 'FiniteMap' to a @[(key, elt)]@ sorted by 'Ord' key
+--
 fmToList       :: FiniteMap key elt -> [(key,elt)]
+
+-- | Extract the keys from a 'FiniteMap', in the order of the keys, so
+--
+-- > keysFM == map fst . fmToList
+--
 keysFM         :: FiniteMap key elt -> [key]
+
+-- | Extract the elements from a 'FiniteMap', in the order of the keys, so
+--
+-- > eltsFM == map snd . fmToList
+--
 eltsFM         :: FiniteMap key elt -> [elt]
 
 -- ---------------------------------------------------------------------------