How I can define a non zero integer in F# that rise a compile time error when assigning zero value?
My question comes by watching this Scott Wlaschin video https://www.youtube.com/watch?v=E8I19uA-wGY&t=960s in minute 16:00
I have found another answers to this question in SO but all refers to a dynamic checking(throwing exception at creation time) but this approach is not a big deal and can be done in any OO and not OO languages. What I'm looking is something like: type NonZeroInteger = int except 0 or something like that.