roc
roc copied to clipboard
`List.range` is neither inclusive nor exclusive
According to the doc it Returns a list of all the integers between one and another, including both of the given numbers.
aka an inclusive range, but in practice:
» List.range 1 1
[1] : List (Int *)
» List.range 1 2
[1] : List (Int *)
» List.range 1 3
[1, 2] : List (Int *)
In the first invocation, it returns an inclusive range, but for the second and third, it returns an exclusive range.
Just going to point this is to #4169 as well. It is about changing the List.range
api as a whole. So they might fit well as a PR together.