Skip to content

Custom comparison #13177

Answered by dsyme
joshua-light asked this question in Q&A
Discussion options

You must be logged in to vote

There is no direct way to overload= in F#. You could define your own operator. You might also get some mileage from an op_Implicit. However neither are really that recommended (they make code harder to understand, and you should probably just really accept a tax of an explicit coercion for converting int --> Nat.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by joshua-light
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants