How to create new array by combining two existing arrays in F#

1 Answer

0 votes
let arr1 = [| 1; 2; 3|]
let arr2 = [| 4; 5; 6; 7|]

let arr3 = Array.append arr1 arr2

printfn "%A" arr3

for i in 0 .. arr3.Length - 1 do
    printf "%d " (Array.get arr3 i)
  

  
(* 
run:
  
[|1; 2; 3; 4; 5; 6; 7|]
1 2 3 4 5 6 7 
  
*)

 



answered Sep 20, 2020 by avibootz

Related questions

1 answer 251 views
1 answer 245 views
1 answer 260 views
1 answer 232 views
232 views asked Mar 8, 2021 by avibootz
1 answer 224 views
1 answer 238 views
238 views asked Sep 20, 2020 by avibootz
2 answers 255 views
...