forked fromdotnet/fsharp
- Notifications
You must be signed in to change notification settings - Fork0
Commit2f5d047
Array.chunkBySize does not return final chunk in some cases
An example case is Array.chunkBySize 3 [|1..4|], the code calculates thenumber of chunks to be 2, and then does not copy the final (partial) chunkas 4 mod 2 is 0. Similarly for Array.chunkBySize 5 [|1..12|], number ofchunks is 3 and 12 % 3 = 0Changing check to len % chunkSize fixes this.Fixesdotnet#501Closesdotnet#5031 parentd02a425 commit2f5d047
File tree
2 files changed
+3
-1
lines changed- src/fsharp
- FSharp.Core.Unittests/FSharp.Core/Microsoft.FSharp.Collections
- FSharp.Core
2 files changed
+3
-1
lines changedLines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
151 | 151 | | |
152 | 152 | | |
153 | 153 | | |
| 154 | + | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
584 | 584 | | |
585 | 585 | | |
586 | 586 | | |
587 | | - | |
| 587 | + | |
588 | 588 | | |
589 | 589 | | |
590 | 590 | | |
| |||
0 commit comments
Comments
(0)