g
let (|Int|_|) (str: string) =
match System.Int32.TryParse str with
| true, value -> Some value
| _ -> None
let main2 argv =
match argv |> Seq.truncate 2 |> Seq.toList with
| [Int(port)::ipadress::_] -> printfn "port: %d, ipadress: %s" port ipadress
| _ -> printfn "Error"
