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 232 views
1 answer 231 views
1 answer 234 views
1 answer 209 views
209 views asked Mar 8, 2021 by avibootz
1 answer 203 views
1 answer 218 views
218 views asked Sep 20, 2020 by avibootz
2 answers 231 views
...