Image from Amazon Title: Kotlin Cookbook: A Problem-Focused Approach
Author(s): Ken Kousen
Amazon wrote:Use Kotlin to build Android apps, web applications, and more―while you learn the nuances of this popular language. With this unique cookbook, developers will learn how to apply this Java-based language to their own projects. Both experienced programmers and those new to Kotlin will benefit from the practical recipes in this book.
“Kotlin Cookbook” starts out by saying the target audience is experienced developers who already known an OO language, preferably Java or another JVM language. I'd argue it should be a requirement and not “preerably.” If you don't meet that criteria, get an intro book. If you do meet that criteria, the book is excellent.
Recipe #1 starts by talking about play.kotlinlang.org so you can try examples without installing anything. Chapter 1 also covers a variety of other ways to run Kotlin including Maven and Graal. Many of these assume you know the Java ecosystem. Which is fine assuming you meet the reader critiera.
There are fun examples like Kim/Kanye's kid North (well, Ye now, but he went by Kanye when the book was written.) I also liked the fun fact about JK Rowling's middle name.
A lot of the recipes cover interacting with Java. Or use Java equivalents. Like sequences which are compared to Java streams. Great mental model for Java developers and key differences are highlighted. For example, you can iterate through a sequence more than once. I learned new things like the Nothing class and coercing to restrict a value to a range.
I feel like this should have been called the “Kotlin Cookbook for Java Developers.” I'll take off one horseshoe for that .