FractionalRadix commented on Kotlin in Action, Second Edition by Dmitry Jemerov
Chapter 6 covers collections and sequences. Nothing really new, but it was nice to be reminded that groupBy has a more specialized version in partition. With this, a list can be split in two - a list of elements that satisfy a predicate and a list of those that don't. These lists are then obtained by deconstruction. For example, val (files, subdirectories) = fileSystemObjects.partition { it.isFile }