Skip to content

v0.7.0-dev.4

Pre-release
Pre-release
Compare
Choose a tag to compare
@passsy passsy released this 29 Dec 19:21
· 156 commits to master since this release
  • New extension Iterable.toImmutableList(): KtList
  • New extension Iterable.toImmutableSet(): KtSet
  • New extension KtIterable<num>.average(): double
  • Relax sortBy/sortByDescending, maxBy/minBy typing to work better with ints and doubles
// Was: int doesn't not implement Comparable<int> but Comparable<num>
// minBy therefore required some help to figure out the correct type (<num>) 
users.minBy<num>((it) => it.age);

// Now: minBy doesn't require the Comparable (num) to have the same same as the value (int).
users.minBy((it) => it.age);