KT-20357 Add samples for maxBy and minBy

This commit is contained in:
Karen Schwane
2018-10-31 08:21:30 +01:00
committed by ilya-g
parent aae24c993d
commit d88fd8aa6f
7 changed files with 76 additions and 0 deletions
@@ -298,6 +298,7 @@ object Aggregates : TemplateGroupBase() {
} builder {
inline()
doc { "Returns the first ${f.element} yielding the smallest value of the given function or `null` if there are no ${f.element.pluralize()}." }
sample("samples.collections.Collections.Aggregates.minBy")
typeParam("R : Comparable<R>")
returns("T?")
body {
@@ -380,6 +381,7 @@ object Aggregates : TemplateGroupBase() {
inline()
doc { "Returns the first ${f.element} yielding the largest value of the given function or `null` if there are no ${f.element.pluralize()}." }
sample("samples.collections.Collections.Aggregates.maxBy")
typeParam("R : Comparable<R>")
returns("T?")
body {