Fork me on GitHub
#speculative
<
2019-01-31
>
borkdude16:01:45

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

alexmiller16:01:09

what do you think is not valid?

alexmiller16:01:28

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

alexmiller16:01:33

it’s in the docstring

borkdude16:01:16

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

borkdude17:01:22

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

borkdude17:01:46

inlining in CLJ, not in CLJS

borkdude17:01:59

(nth [3] 0.1 1) ;;=> 3
:thinking_face:

borkdude17:01:17

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

borkdude17:01:11

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

alexmiller17:01:34

Yes, int? seems right