I've been using priority-map from clojure-contrib:
https://github.com/clojure/clojure-contrib/blob/master/modules/priority-map/src/main/clojure/clojure/contrib/priority_map.clj
Peek and pop don't work as I expected after doing a dissoc for an object not
contained in the map. I'm pretty new to Clojure and this community - is
there somewhere I should log the issue?
user=> (def test-map (priority-map 1 1 2 2))
#'user/test-map
user=> (peek (dissoc (priority-map 1 1 2 2) 1)) ; works how I expected
[2 2]
user=> (peek (dissoc (priority-map 1 1 2 2) 3)) ; expected [1 1]
[nil nil]
user=> (pop (dissoc (priority-map 1 1 2 2) 3)) ; expected {2 2}
{1 1, 2 2}
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en