Skip to content

Commit

Permalink
Merge pull request #2033 from ncave/fix2030
Browse files Browse the repository at this point in the history
Fixed #2030
  • Loading branch information
MangelMaxime authored Apr 21, 2020
2 parents fe195b0 + 8474d79 commit b8420f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/Fable.Transforms/ReplacementsInject.fs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ let fableReplacementsModules =
"mapIndexed2", [(Types.arrayCons, 2)]
"map2", [(Types.arrayCons, 2)]
"mapIndexed3", [(Types.arrayCons, 3)]
"map3", [(Types.arrayCons, 2)]
"map3", [(Types.arrayCons, 3)]
"mapFold", [(Types.arrayCons, 2)]
"mapFoldBack", [(Types.arrayCons, 2)]
"concat", [(Types.arrayCons, 0)]
Expand Down
7 changes: 7 additions & 0 deletions tests/Main/ArrayTests.fs
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,13 @@ let tests =
let zs = Array.map2 (*) xs ys
zs.[0] |> equal 2.

testCase "Array.map3 works" <| fun () ->
let value1 = [|1.|]
let value2 = [|2.|]
let value3 = [|3.|]
let zs = Array.map3 (fun a b c -> a * b * c) value1 value2 value3
zs.[0] |> equal 6.

testCase "Array.mapi works" <| fun () ->
let xs = [|1.; 2.|]
let ys = xs |> Array.mapi (fun i x -> float i + x)
Expand Down

0 comments on commit b8420f9

Please sign in to comment.