Hacker News new | past | comments | ask | show | jobs | submit login

> What is the static type of x?

an anonymous (Integer | Bool | String) sum-type, of course.




Not a sum type, since if all the components were strings you'd have (String | String | String) = String. The sum type would be 3 × String instead.




Join us for AI Startup School this June 16-17 in San Francisco!

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

Search: