I stumbled upon this by accident
Clojure
(get {:x (reduced 10)} :x)
=> #object[clojure.lang.Reduced 0x28494b99 {:status :ready, :val 10}]
(get-in {:x (reduced 10)} [:x])
=> #object[clojure.lang.Reduced 0x28494b99 {:status :ready, :val 10}]
Clojurescript
(get {:x (reduced 10)} :x)
=> #object[cljs.core.Reduced]
; Same behavior as Clojure
(get-in {:x (reduced 10)} [:x])
=> 10
So get-in
seems to automatically deref
the reduced
value in Clojurescript?