4 ms·
Faced with this problem, I would precisely wrap Lists and Ints in containers implementing a common interface and demand that the input be in that form (actually
by dllthomas 10y ago
Faced with this problem, I would precisely wrap Lists and Ints in containers implementing a common interface and demand that the input be in that form (actually, the input is text right? so I'd parse it into that form - assuming I couldn't get away with just manipulating the textual representation).
Note that in the genuine sum-type case you're wrapping, too.