KT-20357 Add sortedBy() sample (#3283)

This commit is contained in:
Dmitry Borodin
2020-05-19 18:21:21 +02:00
committed by GitHub
parent 0d71758112
commit 1a0b59da49
5 changed files with 32 additions and 1 deletions
@@ -432,7 +432,6 @@ object Ordering : TemplateGroupBase() {
if (f != ArraysOfPrimitives) {
appendStableSortNote()
}
specialFor(Sequences) {
returns("SELF")
doc {
@@ -441,6 +440,8 @@ object Ordering : TemplateGroupBase() {
appendStableSortNote()
sequenceClassification(intermediate, stateful)
}
sample("samples.collections.Collections.Sorting.sortedBy")
body {
"return sortedWith(compareBy(selector))"
}