> 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/ordering-operations/reversed.md).

# reversed

```kotlin
public fun <T> Iterable<T>.reversed(): List<T> {
    if (this is Collection && size <= 1) return toList()
    val list = toMutableList()
    list.reverse()
    return list
}


val list = list(1, 2, 3, 4, 5)
println(list.reversed())  // [5, 4, 3, 2, 1]
```
