Fork me on GitHub
#core-typed
<
2023-08-19
>
ambrosebs19:08:50

Ok, this is even wilder. Just inferred (reduce (fn [a b] (+ a b)) [1]). Involves iteratively checking the first arg until it converges. 1st time: [(Val 1) (Val 1) -> Long], 2nd time [Long Long -> Long]. 3rd time [Long Long -> Long] Done.

😮 10
clojure-spin 6
❤️ 6
ambrosebs19:08:31

We could use this same strategy to check loops. Keep checking until the types of recur args stop changing.