How to check if a sequence is empty in Kotlin? What's the simplest way?
How to check if a sequence is empty in Kotlin? What's the simplest way?
If you mean literally a Sequence, use none() without arguments for "is empty" and any() for "is not empty".
For other collections, these method names work as well, but there's also
isNotEmpty(). Strangely, there is isEmpty, but only for arrays!