From c55498c923c3f9df25ddd4d8d79405c8921ce314 Mon Sep 17 00:00:00 2001 From: davidnolen Date: Mon, 17 Nov 2025 20:29:41 -0500 Subject: [PATCH] MapEntry: switch to case from cond --- src/main/cljs/cljs/core.cljs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/src/main/cljs/cljs/core.cljs b/src/main/cljs/cljs/core.cljs index af6cb080c..12082bdf6 100644 --- a/src/main/cljs/cljs/core.cljs +++ b/src/main/cljs/cljs/core.cljs @@ -6762,14 +6762,16 @@ reduces them without incurring seq initialization" IIndexed (-nth [node n] - (cond (== n 0) key - (== n 1) val - :else (throw (js/Error. "Index out of bounds")))) + (case n + 0 key + 1 val + (throw (js/Error. "Index out of bounds")))) (-nth [node n not-found] - (cond (== n 0) key - (== n 1) val - :else not-found)) + (case n + 0 key + 1 val + not-found)) ILookup (-lookup [node k] (-nth node k nil)) @@ -6779,7 +6781,10 @@ reduces them without incurring seq initialization" (-assoc [node k v] (assoc [key val] k v)) (-contains-key? [node k] - (or (== k 0) (== k 1))) + (case k + 0 true + 1 true + false)) IFind (-find [node k]