Y
Hacker News
new
|
ask
|
show
|
jobs
by
CharlieDigital
115 days ago
`OneOrMore<T>` was an example of using `union` types.
You are free to call it `public union Some<T>(T, IEnumerable<T>)`
1 comments
gf000
115 days ago
But now you can only call methods that are available for both T and IEnumerable<T>, you have no way of knowing which it actually is. (You would know if it were sum types)
link