Details

Type: Defect

Status: Closed

Priority: Trivial

Resolution: Completed

Affects Version/s: None

Fix Version/s: None

Component/s: None

Labels:None
Description
Given:
(defn f [x] (println x) x)
{(f 5) (f 10), (f :x) (f :y)}Clojure produces:
5
10
:x
:y
ClojureScript produces:
5
:x
10
:y
Activity
Brandon Bloom
made changes 
Field  Original Value  New Value 

Summary  emit :map does not interleave side effects of key/value binding expressions  Compilation of unordered collections 
David Nolen
made changes 
Priority  Minor [ 4 ]  Trivial [ 5 ] 
Brandon Bloom
made changes 
Resolution  Completed [ 1 ]  
Status  Open [ 1 ]  Closed [ 6 ] 
See also:
CLJ1043I realized that this problem is actually only partially solvable as is. We could assign the interleaved keys and values to locals before constructing the map. Unfortunately, that doesn't solve a bigger underlying problem: The reader returns unordered sets and maps.
CLJ1043I realized that this problem is actually only partially solvable as is. We could assign the interleaved keys and values to locals before constructing the map. Unfortunately, that doesn't solve a bigger underlying problem: The reader returns unordered sets and maps.