This is the code repository for Kotlin Standard Library Cookbook, published by Packt.
Build optimized applications in Kotlin by learning how to smartly implement standard libraries
Given the verbosity of Java, developers have turned to Kotlin for effective software development. Apart from being a modern programming language, the Kotlin standard library provides vital tools that make day-to-day Kotlin programming easier. This library features the core attributes of the language such as algorithmic problems, design patterns, data processing, and working with files and data streams.
This book covers the following exciting features: Work with ranges, progressions, and sequences in use cases Add new functionalities to current classes with Kotlin extensions Understand elements such as lambdas, closures, and monads Build a REST API consumer with Retrofit and Coroutines adapter Discover useful tips and solutions to make your Android projects Explore the benefits of the standard library features
If you feel this book is for you, get your copy today!
Almost all recipes are present in the Kotlin-Samples directory, however, the separate projects that are created target JS and Android. Inside the Kotlin-Samples directory there is the content of the main project with pure Kotlin samples.
The code will look like the following:
val daysOfYear: IntRange = 1..365
for(day in daysOfYear.reversed()) {
println("Remaining days: $day")
}
Following is what you need for this book: This book is for software developers who are familiar with Kotlin’s basics and want to discover more advanced features and concepts, especially those provided by the Kotlin standard library. It’s also ideal for experienced software developers who are familiar with the functional programming paradigm and other programming languages who want to switch to Kotlin. It will also help Java developers switch to Kotlin and integrate it into existing Java Virtual Machine (JVM) projects.
With the following software and hardware list you can run all code files present in the book (Chapter 1-9).
Chapter | Software required | OS required |
---|---|---|
1 - 7 | JetBrains IntelliJ Idea | Windows, Mac OS X, and Linux (Any) |
8 | JetBrains IntelliJ Idea + Google Android Studio | Windows, Mac OS X, and Linux (Any) |
9 | JetBrains IntelliJ Idea | Windows, Mac OS X, and Linux (Any) |
Samuel Urbanowicz is an experienced software engineer skilled in mobile applications and backend development. A fan of modern programming languages, he has been using Kotlin since its beginning. He's always curious to dive into technologies. He is especially passionate about machine learning. Samuel believes that the Kotlin language has great potential for multiplatform development. He has work experience in both big corps and small start-ups. He is an active contributor to open source projects.
Click here if you have any feedback or suggestions.