我偶然发现了这个问题
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]
;与 Clojure 相同的行为
(get-in {:x (reduced 10)} [:x])
=> 10
所以看起来 ClojureScript 中的 get-in
似乎是自动 deref
reduced
值的?