In Functional Programming in Kotlin you will Functional programming techniques for real-world applications Write combinator libraries Common structures and idioms in functional design Simplicity and modularity (and fewer bugs!) Functional Programming in Kotlin is a reworked version of the bestselling Functional Programming in Scala, with all code samples, instructions, and exercises translated into the powerful Kotlin language. In this authoritative guide, you’ll take on the challenge of learning functional programming from first principles. Complex concepts are demonstrated through exercises that you’ll love to test yourself against. You’ll start writing Kotlin code that’s easier to read, easier to reuse, better for concurrency, and less prone to bugs and errors. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications. About the technology Improve performance, increase maintainability, and eliminate bugs! How? By programming the functional way. Kotlin provides strong support for functional programming, taking a pragmatic approach that integrates well with OO codebases. By applying the techniques you’ll learn in this book, your code will be safer, less prone to errors, and much easier to read and reuse. About the book Functional Programming in Kotlin teaches you how to design and write Kotlin applications using typed functional programming. Offering clear examples, carefully-presented explanations, and extensive exercises, it moves from basic subjects like types and data structures to advanced topics such as stream processing. This book is based on the bestseller Functional Programming in Scala by Rúnar Bjarnason and Paul Chiusano. What's inside Functional programming techniques for real-world situations Common structures and idioms in functional design Simplicity, modularity, and fewer bugs! About the reader For Kotlin developers. No functional programming experience required. About the author Marco Vermeulen has two decades of programming experience on the JVM. Rúnar Bjarnason and Paul Chiusano are the authors of Functional Programming in Scala. Tabel of Contents PART 1 INTRODUCTION TO FUNCTIONAL PROGRAMMING 1 What is functional programming? 2 Getting started with functional programming in Kotlin 3 Functional data structures 4 Handling errors without exceptions 5 Strictness and laziness 6 Purely functional state PART 2 FUNCTIONAL DESIGN AND COMBINATOR LIBRARIES 7 Purely functional parallelism 8 Property-based testing 9 Parser combinators PART 3 COMMON STRUCTURES IN FUNCTIONAL DESIGN 10 Monoids 11 Monads and functors 12 Applicative and traversable functors PART 4 EFFECTS AND I/O 13 External effects and I/O 14 Local effects and mutable state 15 Stream processing and incremental I/O
I've spent over two months with this book - which is frankly not that much, keeping in mind that it's primarily an exercise book - all about applying functional paradigms in practice (in Kotlin, ofc). Even though I spent so much time on a single book, I didn't go carefully through every exercise (!) - but I feel excused: that was not my goal this time. I've already done my functional baptism of fire in 2014 when I went through the original "red" FP in Scala (my review here: https://www.goodreads.com/review/show...). This time, the idea was to get familiar (nearly habitual) with idiomatic, functional Kotlin. So it was more about Kotlin itself (beyond syntax) than FP.
If you are already familiar with Kotlin (as the book assumes so & doesn't start with "Hello world!") AND want to learn what FP really is - this book is definitely for you. But be warned - this will not happen by reading. The idea here is to write (code).
This is an amazing book about functional programming. Doesn't assume much prior knowledge of functional programming yet it deep dives into functional programming fundamentals strongly. For me, it wasn't a fast read but very rewarding.