F # What is the syntax for creating and populating FSharpx.Collections.Vector?

I would like to use the Vector<'T> data structure mentioned here as an answer

stack overflow

but I cannot get the syntax correctly. For instance:

 open FSharpx.Collections let tuple1= (1,2.0,"f") let tuple2= (2,3.0,"f") let myLstOfTuples = [tuple1;tuple2] let myVector = ?? <- how do I do this? 

How to create a vector of type Vector<int * float * string> and fill it with data?

+4
source share
1 answer

The easiest way is to use the ofSeq method as follows

 let myvector = myLstOfTuples |> Vector.ofSeq 
+5
source

Source: https://habr.com/ru/post/1494443/


All Articles