Kotlin Functional Programming Example

Download Kotlin Functional Programming Example PDF/ePub or read online books in Mobi eBooks. Click Download or Read Online button to get Kotlin Functional Programming Example book now. This website allows unlimited access to, at the time of writing, more than 1.5 million titles, including hundreds of thousands of titles in various foreign languages.
Functional Programming in Kotlin

Author: Marco Vermeulen
language: en
Publisher: Simon and Schuster
Release Date: 2021-10-05
In Functional Programming in Kotlin you will learn: 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
Beginner's Guide to Kotlin Programming

This textbook assumes very little knowledge of programming so whether you have dabbled with a little JavaScript, played with a bit of Python, written Java or have virtually no programming experience at all you will find that it is for you. The first part of the book introduces Kotlin program structures as well as conditional flow of control features such as if and when expressions as well as iteration loops such as for, while and do-while. Subsequent chapters explain how functions are implemented in Kotlin and introduce concepts from functional programming such as higher order functions and curried functions. The second part focusses on object oriented programming techniques, these include classes, inheritance, abstraction and interfaces. The third part presents container data types such as Arrays, and collections including Lists, Sets and Maps and the fourth part considers concurrency and parallelism using Kotlin coroutines. The book concludes with an introduction to Android mobile application development using Kotlin. Clear steps are provided explaining how to set up your environment and get started writing your own Kotlin programs. An important aspect of the book is teaching by example and there are many examples presented throughout the chapters. These examples are supported by a public GitHub repository that provides complete working code as well as sample solutions to the chapter exercises. This helps illustrate how to write well structured, clear, idiomatic Kotlin to build real applications.
Functional Programming

""Functional Programming"" presents a comprehensive exploration of how mathematical functions can revolutionize software development through improved reliability, scalability, and maintainability. This thoughtfully structured guide takes readers on a journey through three fundamental pillars: immutability, pure functions, and higher-order functions, demonstrating their practical applications across Haskell, Scala, and JavaScript. The book's unique approach lies in its progressive teaching method, starting with Haskell's strict functional principles before bridging to Scala's hybrid paradigm and finally showing practical applications in JavaScript. Through real-world examples drawn from data processing systems, web applications, and concurrent programming scenarios, the book demonstrates how functional programming naturally addresses modern development challenges. Readers will discover how major companies, from financial institutions to social media platforms, have successfully implemented functional programming principles to reduce bugs and optimize performance. The text maintains accessibility while covering complex concepts, making it valuable for experienced programmers while remaining approachable for intermediate developers. The book distinguishes itself by providing concrete, practical exercises at the end of each chapter, allowing readers to apply theoretical concepts to actual programming challenges. It thoughtfully connects abstract mathematical foundations to practical programming solutions, while addressing current industry debates about functional programming's role in modern software architecture. Throughout the text, readers learn how functional approaches can coexist with and enhance traditional object-oriented programming, particularly in the context of distributed systems and concurrent programming.