Functional Programming in Kotlin
300 pages
English
PDF
4.5

Functional Programming in Kotlin

Functional Programming in Kotlin

Author:

Year:

Summary:

The book "Functional Programming in Kotlin" is a practical guide for developers who want to master the functional style of writing code in the modern Kotlin language. Unlike traditional textbooks, the focus is on real-world cases and techniques that can be immediately applied in projects: from Android applications to server-side services on Ktor and Spring WebFlux.



Who is this book for?

  • Java and Kotlin developers who want to write more concise and predictable code.
  • Programmers familiar with OOP but wanting to learn the functional paradigm without leaving the JVM platform.
  • Architects and team leads implementing reactive and asynchronous approaches.


What will you learn?

  • Fundamentals of functional programming: pure functions, immutability, absence of side effects.
  • Working with higher-order functions, lambda expressions, and closures in Kotlin.
  • Patterns of composition, currying, and partial application.
  • Monads and functors in practice: Option, Either, Try — how to avoid exceptions and null.
  • Reactive programming using Kotlin Coroutines and Flow.
  • Testing functional code: property-based testing and mock-free approaches.
  • Integrating functional libraries (Arrow, Kotlinx.collections.immutable) into existing projects.


Book features:

  • Over 50 code examples with explanations and diagrams.
  • Practical exercises at the end of each chapter (with answers in the appendix).
  • A chapter on migrating legacy code to functional rails.
  • Comparison with Java Stream API and Scala for better context understanding.


This book will be your guide to the world of functional programming in Kotlin — from basic concepts to advanced techniques that will make your code more reliable, readable, and easier to maintain.

Recommendations