Haha, so cool. With object inference,
(-> (assoc! {} :a :b) (assoc! :c :d) (assoc! :e :f))
now becomes:
(o=>(o.e="f",o))((o=>(o.c="d",o))((o=>(o.a="b",o))({})))
after minified with esbuildhttps://clojurians.slack.com/archives/C015AL9QYH1/p1760782787225469
Since (:foo ...) compiles to get and destructuring also compiles to get calls, this is automatically optimized too. I hadn't even realized that.
(let [x {:a 1 :b 2 :c 2}
{:keys [a b c]} x]
[a b c])
const x2 = { a: 1, b: 2, c: 2 };
const map__13 = x2;
const a4 = map__13["a"];
const b5 = map__13["b"];
const c6 = map__13["c"];
[a4, b5, c6];