speculative 2019-01-31

apparently this is valid: (nth [3] -1 2147483647), I need to change tha specz

Alex Miller (Clojure team) 2019-01-31T16:41:09.189600Z

what do you think is not valid?

Alex Miller (Clojure team) 2019-01-31T16:42:28.190200Z

oh, you scoped the index just to nat-int?, but there is behavior defined for out-of-range values

Alex Miller (Clojure team) 2019-01-31T16:42:33.190400Z

it’s in the docstring

yes, I missed it. didn’t expect anyone to use it like this, but coal-mine detected one 🙂

interestingly, this only manifested in CLJS. I’m going to check why…

inlining in CLJ, not in CLJS

(nth [3] 0.1 1) ;;=> 3
🤔

I’m going to change the spec to int? instead of nat-int, that should be sufficient

oh, I didn’t write this spec, but I did review it, so still my bad 😉

Alex Miller (Clojure team) 2019-01-31T17:37:34.194700Z

Yes, int? seems right