Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The "sum" and "product" is more about the cardinality of the type. If you have a type A with 3 possible values and B with 5 possible values, then the sum type X = A+B has 8 possible distinct values while the product type Y = A*B has 15 possible values


Yeah, that's the bad definition that leads to problems like the one the OP describes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: