大文字数を数えるダメな例
val String.upperCaseCount: Int
get() = filter { it.isUpperCase() }.length
大文字数を数える良い例
val String.upperCaseCount: Int
get() = count { it.isUpperCase() }
val String.upperCaseCount: Int
get() = filter { it.isUpperCase() }.length
val String.upperCaseCount: Int
get() = count { it.isUpperCase() }