Closed mrwizard82d1 closed 2 years ago
@mrwizard82d1 thanks for posting this issue, the implementation is ok, and certainly the error was in the documentation, fixed in https://github.com/mobily/ts-belt/commit/726840a8a5bb709be1d5dc4ff5df7585d7726053!
Thanks for producing this library.
I'm new to TypeScript and somewhat new to functional programming, but this library seems to have what I would like to see in a functional programming library.
The documentation for
A.range
states "Returns a new array of numbers from start (inclusive) to finish (exclusive)." However, it actually appears to include the upper bound. Here is the text from a Node session (usingts-node
):When I look at the documentation for
Belt.Array.range
, it reports that the range is inclusive (on both arguments) and the following example duplicates the behavior that I am seeing:I'm uncertain if the error is in the documentation or in the implementation.