you should write the last line as follows:
let urls = Seq.map matchToUrl (Seq.cast matches);;
And this can be written in a more convenient way using the pipelining operator:
let urls = matches|> Seq.cast |> Seq.map matchToUrl;;
F # automatically determines what the correct type of target is (because it knows what it looks like matchToUrl). This is only available for Seq, so you can use List.of_seqto get the data in the list again.
source
share