Functional Programming in Kotlin
Marco Vermeulen, Rúnar Bjarnason, and Paul Chiusano
  • MEAP began August 2019
  • Publication in Summer 2020 (estimated)
  • ISBN 9781617297168
  • 325 pages (estimated)
  • printed in black & white
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, and start writing Kotlin code that’s easier to read, easier to reuse, better for concurrency, and less prone to bugs and errors.
Table of Contents detailed table of contents

Part 1: Introduction to Functional Programming

1 What is functional programming?

1.1 The benefits of FP: a simple example

1.1.1 A program with side effects

1.1.2 A functional solution: removing the side effects

1.2 Exactly what is a (pure) function?

1.3 Referential transparency, purity, and the substitution model

1.4 What you will learn in this book

1.5 Summary

2 Getting started with functional programming in Kotlin

2.1 Introducing Kotlin as language: an example

2.2 Running our program

2.3 Objects, scopes and namespaces

2.4 Higher-order functions: passing functions to functions

2.4.1 A short detour: writing loops functionally

2.4.2 Writing our first higher-order function

2.5 Polymorphic functions: abstracting over types

2.5.1 An example of a polymorphic function

2.5.2 Calling HOFs with anonymous functions

2.6 Following types to implementations

2.7 Summary

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

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

Appendixes

Appendix A: Appendix A: Exercise solutions

About the Technology

Kotlin is a new JVM language designed to interoperate with Java and offer an improved developer experience for creating new applications. It’s already a top choice for writing web services, and Android apps. Although it preserves Java’s OO roots, Kotlin really shines when you adopt a functional programming mindset. By learning the core principles and practices of functional programming outlined in this book, you’ll start writing code that’s easier to read, easier to test and reuse, better for concurrency, and less prone to bugs.

About the book

Functional Programming in Kotlin is a serious tutorial for programmers looking to learn FP and apply it to the everyday business of coding. Based on the bestselling Functional Programming in Scala, this book guides intermediate Java and Kotlin programmers from basic techniques to advanced topics in a logical, concise, and clear progression. In it, you'll find concrete examples and exercises that open up the world of functional programming. The book will deliver practical mastery of FP using Kotlin and a valuable perspective on program design that you can apply to other languages.

What's inside

  • Functional programming techniques for real-world applications
  • Write combinator libraries
  • Identify common structures and idioms in functional design
  • Code for simplicity, modularity, and fewer bugs

About the reader

For intermediate Kotlin and Java developers. No experience with functional programming is required.

About the author

Marco Vermeulen has almost two decades of programming experience on the JVM, with much of that time spent on functional programming using Scala and Kotlin.

Rúnar Bjarnason and Paul Chiusano are the authors of Functional Programming in Scala, on which this book is based. They are internationally-recognized experts in functional programming and the Scala programming language.

Manning Early Access Program (MEAP) Read chapters as they are written, get the finished eBook as soon as it’s ready, and receive the pBook long before it's in bookstores.
MEAP combo $49.99 pBook + eBook + liveBook
MEAP eBook $39.99 pdf + ePub + kindle + liveBook
Prices displayed in rupees will be charged in USD when you check out.

placing your order...

Don't refresh or navigate away from the page.

FREE domestic shipping on three or more pBooks