speculative

https://github.com/borkdude/speculative
borkdude 2019-01-31T16:30:45.189300Z

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

alexmiller 2019-01-31T16:41:09.189600Z

what do you think is not valid?

alexmiller 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

alexmiller 2019-01-31T16:42:33.190400Z

it’s in the docstring

borkdude 2019-01-31T16:57:16.190900Z

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

borkdude 2019-01-31T17:00:22.191700Z

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

borkdude 2019-01-31T17:07:46.192400Z

inlining in CLJ, not in CLJS

borkdude 2019-01-31T17:08:59.192800Z

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

borkdude 2019-01-31T17:10:17.193300Z

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

borkdude 2019-01-31T17:12:11.193700Z

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

borkdude 2019-01-31T17:17:55.194Z

fixed

alexmiller 2019-01-31T17:37:34.194700Z

Yes, int? seems right