Open JamzOJamz opened 1 year ago
Totally agree. This unexpected API-issue does of course apply to radash.list
as well.
When a single parameter is passed, it is named size
in the documentation, but the actual size / length of the iterator returned is one more than the number passed as size
-parameter.
Hello @JamzOJamz and @torgesla, we'd be open to fixing this over at the Radashi fork, if either of you want to champion the effort. Of course, it's a breaking change, so please target the next
branch with your PR.
Why is the
range
function in Radash max inclusive rather than max exclusive? The docs say that the function is a hat tip to the Python implementation by the same name, so why don’t they function identically? It makes it hard to iterate over an array without making the max valuearr.length - 1
.Am I missing something in the docs? Any guidance would be much appreciated :)