3 ms·
You always need to think about the corner cases. What is the longest element in an empty list of lists? It might be better to get an error in such a case than
by ScottBurson 12y ago
You always need to think about the corner cases. What is the longest element in an empty list of lists? It might be better to get an error in such a case than to have an empty list returned, since that's not an element of the input list, in violation of one possible interpretation of the function's specification.
> Code like above is simply less readable.
I write code like this all the time, and have for 35 years. I think it's perfectly readable.