F# Records: Dangerous, only for limited use, or well used functionality?
问题 So have gotten to record in my F# journey and at first they seem rather dangerous. At first this seemed clever: type Card = { Name : string; Phone : string; Ok : bool } let cardA = { Name = "Alf" ; Phone = "(206) 555-0157" ; Ok = false } The idea that the cardA is patten matched with Card. Not to mention the simplified pattern matching here: let withTrueOk = list |> Seq.filter (function | { Ok = true} -> true | _ -> false ) Problem is: type Card = { Name : string; Phone : string; Ok : bool }