>>101584248
hmm thanks. I just ended up using cut. ya it seems like its just python. at least hyrule has inc though.
(defn merge [left right]
(let [res [] i 0 j 0]
(while (and (< i (len left)) (< j (len right)))
(if (< (get left i) (get right j))
(do
(.append res (get left i))
(setv i (inc i)))
(do
(.append res (get right j))
(setv j (inc j)))))
(if (< i (len left))
(.extend res (cut left i None))
(.extend res (cut right j None)))
res))
(merge [1 2] [3 4])
(defn sort [arr]
(if (<= (len arr) 1)
arr
(let [mid (// (len arr) 2)
left (sort (cut arr 0 mid))
right (sort (cut arr mid None))]
(merge left right))))
(sort [5 4 3 2 1])