ClojureScript

Make order in which sorted map nodes are visited by reduce-kv consistent with entry order

Details

  • Type: Defect Defect
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Completed
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

On master, (reduce-kv prn nil (sorted-map :foo 1 :bar 2)) prints :foo before :bar. With the forthcoming patch applied, :bar comes first.

Activity

Hide
David Nolen added a comment -

Can we add test case via pr-str? Thanks!

Show
David Nolen added a comment - Can we add test case via pr-str? Thanks!
Hide
Michał Marczyk added a comment - - edited

Sure, here's same patch plus a test case based on conjing onto a vector.

I just noticed that Clojure 1.4's kvreduce on tree maps has funky visit order. Current RC of 1.5 is fixed (thanks to a patch by Alan Malloy, see 3c22b53f94f583bfda6b59c97310de82595e993c).

Show
Michał Marczyk added a comment - - edited Sure, here's same patch plus a test case based on conjing onto a vector. I just noticed that Clojure 1.4's kvreduce on tree maps has funky visit order. Current RC of 1.5 is fixed (thanks to a patch by Alan Malloy, see 3c22b53f94f583bfda6b59c97310de82595e993c).

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: