Firstly, I'm new to f #, so maybe the answer is obvious, but I don't see it. So I have some tuples with id and value. I know the identifier I'm looking for, and I want to select the correct tuple from the three that I pass. I was going to do this with two conformance statements, one nested in the other, but it all depends on the first rule. In this example, I reduced it to two tuples, as this shows my problem. The compiler gives a warning โthe rule will never matchโ, but I donโt understand why.
let selectTuple tupleId tuple1 tuple2 = match tuple1 with | (tupleId, _) -> tuple1 | _ -> tuple2
Any help or suggestions on the best way to do this would be greatly appreciated.
Jesse source share