Skip to content

Commit

Permalink
Merge pull request #75 from UnixJunkie/patch-2
Browse files Browse the repository at this point in the history
fix mapi_range used by array_parmapi
  • Loading branch information
rdicosmo authored Jul 10, 2018
2 parents d23100d + 961fa9b commit 6be3de4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion parmap.ml
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ let parfold
let mapi_range lo hi (f:int -> 'a -> 'b) a =
let l = hi-lo in
if l < 0 then [||] else begin
let r = Array.create (l+1) (f 0 (Array.unsafe_get a lo)) in
let r = Array.create (l+1) (f lo (Array.unsafe_get a lo)) in
for i = 1 to l do
let idx = lo+i in
Array.unsafe_set r i (f idx (Array.unsafe_get a idx))
Expand Down

0 comments on commit 6be3de4

Please sign in to comment.