> 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/filtering-operations/dropwhile.md).

# dropWhile

주어진 조건에 맞는 element 들은 drop 을 시키고 나머지를 리턴한다

```kotlin
public inline fun <T> Iterable<T>.dropWhile(predicate: (T) -> Boolean): List<T> {
    var yielding = false
    val list = ArrayList<T>()
    for (item in this)
        if (yielding)
            list.add(item)
        else if (!predicate(item)) {
            list.add(item)
            yielding = true
        }
    return list
}


val list = listOf(1, 2, 3, 4, 5)
println(list.dropWhile{ it < 3 })  // [3, 4, 5]
```
