I am new to the functional programming and F#
I'm trying to convert a list of tuples into parallel lists, for example
let results = [("foo",3);("bar", 4)};("bazz", 8)]
// do something to convert it
// output = ["foo";"bar";"bazz"], output2 = [3;4;8]
What I attempted to was this
let issue = []
let count = []
for tpl in results do
fst tpl |> issue
snd tpl |> count
But obviously this wont compile.
I am getting the list of tuples from the statement
let results = IssueData |> Seq.countBy id |> Seq.toList
How would I go about doing this?
Aucun commentaire:
Enregistrer un commentaire