When you define your own classes and want to use them as set or bag elements or map keys, you need to tell FSet how to compare and hash them. FSet provides some convenience features to make this usually very easy. The case where you’ll need to do more work is when the class is itself some kind of collection; I’ll return to this below.
For a non-collection class, there are two major cases, depending on whether you want your class to have value semantics or reference semantics: whether it is a pure value or a mutable object.