projects
/
ganeti-local
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d4f62d4
)
Container: add a 'keys' function
author
Iustin Pop
<iustin@google.com>
Sun, 15 Feb 2009 13:40:13 +0000
(14:40 +0100)
committer
Iustin Pop
<iustin@google.com>
Sun, 15 Feb 2009 13:40:13 +0000
(14:40 +0100)
src/Container.hs
patch
|
blob
|
history
diff --git
a/src/Container.hs
b/src/Container.hs
index
74ce2b5
..
d728238
100644
(file)
--- a/
src/Container.hs
+++ b/
src/Container.hs
@@
-21,6
+21,7
@@
module Container
, remove
-- * Conversion
, elems
+ , keys
) where
import qualified Data.IntMap as IntMap
@@
-56,6
+57,10
@@
remove = IntMap.delete
elems :: Container a -> [a]
elems = IntMap.elems
+-- | Return the list of keys in the map.
+keys :: Container a -> [Key]
+keys = IntMap.keys
+
-- | Create a map from an association list.
fromAssocList :: [(Key, a)] -> Container a
fromAssocList = IntMap.fromList