Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-ganeti
Commits
1fd47ca2
Commit
1fd47ca2
authored
Feb 15, 2009
by
Iustin Pop
Browse files
Container: add a 'keys' function
parent
d4f62d4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/Container.hs
View file @
1fd47ca2
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment