|
|
|
|
|
by nequo
1127 days ago
|
|
> number of elements to process is exactly the difference between last and first index of the range And in Julia, it’s length(a:b)
which also works with non-unit step sizes like length(a:x:b)
The intent of these expressions seems clearer than the intent of `b-a` and `ceiling((b-a)/x)` with your proposed approach in a zero-indexed language. |
|