forked from dotnet/fsharp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Array.chunkBySize does not return final chunk in some cases
An example case is Array.chunkBySize 3 [|1..4|], the code calculates the number of chunks to be 2, and then does not copy the final (partial) chunk as 4 mod 2 is 0. Similarly for Array.chunkBySize 5 [|1..12|], number of chunks is 3 and 12 % 3 = 0 Changing check to len % chunkSize fixes this. Fixes dotnet#501 Closes dotnet#503
- Loading branch information
1 parent
d02a425
commit 2f5d047
Showing
2 changed files
with
3 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters