4

Example, nevermind the utility of it:

type Rec = ( int * obj )  
let r1 = (1, o1)
let r2 = (1, o2)
r1=r2   // i would like it to be true. I mean the second member to be excluded from structural equality
John Palmer
  • 25,356
  • 3
  • 48
  • 67
Liviu
  • 595
  • 4
  • 11

1 Answers1

2

Firstly, this isn't a record, but a type alias.

I think the best approach would be to define a new operator.

let inline (====) a b = (fst a ) = (fst b)
John Palmer
  • 25,356
  • 3
  • 48
  • 67