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 language Kotlin. Unlike many introductory materials, it is not limited to a superficial overview of lambdas and collections, but consistently reveals the fundamental concepts of functional programming: pure functions, data immutability, composition, monads, and algebraic data types.



The book is aimed at programmers already familiar with the basics of Kotlin (syntax, classes, basic collections) but who wish to raise their level of abstraction and write more reliable, predictable, and easily testable code. It will be useful both for backend developers using Kotlin on the JVM and for authors of mobile applications on Android who strive to reduce the number of side effects and simplify debugging.



The reader will learn:

  • How lambda expressions, higher-order functions, and currying work in Kotlin.
  • Why data immutability reduces the number of errors and how to apply it effectively.
  • What functors, applicative functors, and monads (Option, Either, Try) are and how they help handle the absence of values and exceptions without exceptions.
  • How to build data processing pipelines using function composition and extension functions.
  • How to use algebraic data types (sealed class) for domain modeling.
  • The principles of recursion and memoization for elegantly solving problems.


Each chapter contains not only theory but also practical examples that can be immediately run and modified. At the end of the sections, exercises are offered to reinforce the material. The book is written in a lively language with an emphasis on real-world scenarios from everyday development, rather than abstract mathematical constructs.



After reading, you will be able to confidently apply functional approaches in your Kotlin projects, making the code more concise, safe, and maintainable. This is not just another reference book — it is a guide to shifting your mindset from imperative to functional, while maintaining pragmatism and a focus on results.

Recommendations