Re:Letter to a Young Haskell Enthusiast
by kazinator on Friday August 01, 2014 @04:41PM
(#8122699)
Are you sure that is a list, and not something else, like a tuple?
[ Parent
| on HN ]
It's precisely a tuple, obviously. Are you sure you said "list", not "heterogeneous collection"?
If you know what is where in the list, then you semantically have a tuple.
If you don't know what is where in the list, then you need some way of telling things apart. At which point an ADT is frequently the right solution, isn't any sort of advanced technique, and requires very little in the way of boilerplate.