|
|
|
|
|
by bcrosby95
1205 days ago
|
|
Depending upon language, and what you're using to hold the array, inheritance. A 'NotEmpty a' is just a subclass of a potentially empty 'a'. You also get the desirable behavior, in this scenario, of automatic upcasting of a 'NotEmpty a' into a regular old 'a'. |
|
It is rather the subclass of some kind of 'Iterable a'.