تخطَّ إلى المحتوى

Combine Collection Operations (ARCH8077)

هذا المحتوى غير متوفر بلغتك بعد.

Key kotlin.performance.combine-collection-operations · Severity info · Category performance

Flags filter { }.first() / filter { }.count() / filter { }.isNotEmpty() / map { }.filterNotNull() chains that have a single-pass equivalent.

users.filter { it.admin }.first()
users.first { it.admin }

Use first { }, count { }, any { }, mapNotNull { }.