Statelike Sébastien suggested would probably be better in that regard
droprequires an immediate
isEmptycall, which forces the
LazyList, if it's meant to be fully lazy, should be pretty special.
LinearSeqstarts by checking
compareSize(xs)I'd likely use in other ways.
xs.lengthIs < 0thing because the name suggests the usage without having to consult an API.
(the distinction being that size is not meant to imply a consistent ordering, whereas length is).
I didn’t know this distinction exists, I also don’t know how consistant this is. All I can say from my perspective, from a language PoV length vs size mean basically the same thing in this context and they say nothing about whether the collection is ordered or not