This question does not concern C # / F # compatibility, as in this one .
I would like to know how to use void to create an F # Unit type .
Obviously, I will drop this result, and I will not expose this type to the outside world.
I wonder if an empty class can impersonate this role.
internal class Unit { }
For example, in the language-ext library, the author used struct .
Is there any benefit to this choice?
c # functional-programming f # unit-type
gsscoder
source share