> For the complete documentation index, see [llms.txt](https://gold.gitbook.io/kotlin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://gold.gitbook.io/kotlin/collections/aggregate-operations/all.md).

# all

주어진 조건이 collection 의 모든 element 들에 대해 참일때 true 를 반환한다

```kotlin
public inline fun <T> Iterable<T>.all(predicate: (T) -> Boolean): Boolean {
    for (element in this) if (!predicate(element)) return false
    return true
}

val list = listOf(1, 2, 3, 4, 5)

println(list.all{ it > 3 }) // false
println(list.all{ it > 0 }) // true
println(list.all{ it > 5 }) // false
```
