robfletcher / strikt

An assertion library for Kotlin
https://strikt.io/
Apache License 2.0
549 stars 59 forks source link

Add filterNotNull() for Iterables. #273

Open mlewe opened 2 years ago

mlewe commented 2 years ago
fun <T> Builder<out Iterable<T?>>.filterNotNull(): Builder<List<T>> =
        get { this.filterNotNull() }

Would make a nice addition to the already existing filter, filterNot and filterIsInstance.