My Account Log in

3 options

Functional kotlin : extend your OOP skills and implement functional techniques in Kotlin and arrow / Mario Arias, Rivu Chakraborty.

EBSCOhost Academic eBook Collection (North America) Available online

View online

Ebook Central College Complete Available online

View online

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Arias, Mario, author.
Chakraborty, Rivu, author.
Language:
English
Subjects (All):
Android (Electronic resource).
Application software--Development.
Application software.
Physical Description:
1 online resource (350 pages)
Edition:
1st edition
Place of Publication:
Birmingham, [England] ; Mumbai, [India] : Packt Publishing, 2018.
System Details:
text file
Summary:
Learn how to apply Functional Programming with Kotlin to real-life projects with popular libraries like Arrow. About This Book Focus on the functional aspects of Kotlin and identify the advantages that functional programming brings to the table and the associated coding benefits, Implement common functional programming design patterns and techniques. Learn to combine OOP and Reactive Programming with Functional Programming and how RxKotlin and funkTionale can help you implementing Functional Programming in Kotlin Who This Book Is For Kotlin developers who have no functional programming experience, will benefit from this book. What You Will Learn Learn the Concepts of Functional Programming with Kotlin Discover the Coroutines in Kotlin Uncover Using funkTionale plugin Learn Monads, Functiors and Applicatives Combine Functional Programming with OOP and Reactive Programming Uncover Using Monads with funkTionale Discover Stream Processing In Detail Functional programming makes your application faster, improves performance, and increases your productivity. Kotlin supports many of the popular and advanced functional features of functional languages. This book will cover the A-Z of functional programming in Kotlin. This book bridges the language gap for Kotlin developers by showing you how to create and consume functional constructs in Kotlin. We also bridge the domain gap by showing how functional constructs can be applied in business scenarios. We'll take you through lambdas, pattern matching, immutability, and help you develop a deep understanding of the concepts and practices of functional programming. If you want learn to address problems using Recursion, Koltin has support for it as well. You'll also learn how to use the funKtionale library to perform currying and lazy programming and more. Finally, you'll learn functional design patterns and techniques that will make you a better programmer.By the end of the book, you will be more confident in your functional programming skills and will be able to apply them while programming in Kotlin. Style and approach Loaded with numerous code examples and real life projects, this book helps you dive deep into Functional Programming with Kotlin as well as applying it with help of Functional Programming Plugins like funkTionale and RxKotlin. Downloading the example code for this book You can download the example code files for all Packt books you have purchased from your account at http://www.PacktPub.com. ...
Contents:
Cover
Title Page
Copyright and Credits
Dedication
Packt Upsell
Contributors
Table of Contents
Preface
Chapter 1: Kotlin - Data Types, Objects, and Classes
Classes
Properties
Methods
Inheritance
Abstract classes
Interfaces
Objects
Object declarations
Companion objects
Generics
Type alias
Nullable types
Checking for null
Checking for non-null types
Safe calls
The Elvis (?:) operator
The (!!) operator
Kotlin's type system
The Any type
Minimum common types
The Unit type
The Nothing type
Other types
Data classes
Canonical methods
The copy() method
Destructuring methods
Annotations
Enum
Summary
Chapter 2: Getting Started with Functional Programming
What is functional programming?
Basics concepts
First-class and higher-order functions
Pure functions
Recursive functions
Lazy evaluation
Functional collections
Implementing a functional list
Chapter 3: Immutability - It's Important
What is immutability?
Implementing immutability in Kotlin
The difference between var and val
Compile time constants
Types of immutability
Immutable reference (referential immutability)
Immutable values
Immutable collections
The advantages of immutability
Thread safety
Low coupling
Referential transparency
Failure atomicity
Caching
Compiler optimization
The disadvantages of immutability
Chapter 4: Functions, Function Types, and Side Effects
Functions in Kotlin
Returning two values from a function
Extension functions
Default arguments
Nested functions
Function types in functional programming
Lambda
Function as property
High order functions
Pure functions and side effects
Side effects
Summary.
Chapter 5: More on Functions
Single-expression functions
Parameters
vararg
Named parameters
Named parameters on high-order functions
Default parameters
Extension functions and inheritance
Extension functions as members
Extension functions with conflicting names
Extension functions for objects
Infix functions
Operator overloading
Binary operators
Invoke
Indexed access
Unary operators
Type-safe builders
Creating a DSL
Inline functions
Inline restrictions
Recursion and corecursion
Chapter 6: Delegates in Kotlin
Introduction to delegation
Understanding delegation
Delegates in Kotlin
Property delegation (standard delegates)
The Delegates.notNull function and lateinit
The lazy function
Observing property value change with Delegates.Observable
The power of veto - Delegates.vetoable
Delegated map
Custom delegation
Local delegates
Class delegation
Chapter 7: Asynchronous Programming with Coroutines
Introduction to coroutines
Understanding JVM threads
Hello, coroutine world!
Using coroutines in real life
Synchronous implementation
Callbacks
Java Futures
Promises with Kovenant
Coroutines
Coroutine context
Channels
Channel pipelines
Managing mutable state
Switching contexts
Thread safe structures
Mutexes
Actors
Chapter 8: Collections and Data Operations in Kotlin
An introduction to collections
The advantages of a collections framework
List and MutableList
Set and MutableSet
Map and MutableMap
Data operations in a collection
The map function
The filter function
The flatMap function
The drop functions
The take functions
The zip function
Grouping collections
Chapter 9: Functional Programming and Reactive Programming
Combining FP with OOP
Functional reactive programming
The Reactive Manifesto
Functional reactive frameworks for Kotlin
Getting started with RxKotlin
Downloading and setting up RxKotlin
Comparing the Pull mechanism with the RxJava Push mechanism
Observables
How Observable works
The Observable.create method
The Observable.from methods
Iterator&lt
T&gt
.toObservable
Subscriber - the Observer interface
Subscribing and disposing
Chapter 10: Functors, Applicatives, and Monads
Functors
Monads
Applicatives
Chapter 11: Working with Streams in Kotlin
Introduction to Streams
Collections versus Streams
Working with Streams
Primitive streams
Stream factory methods
Stream Builder
Creating empty Streams - Stream.empty()
Creating a Stream by passing elements - Stream.of()
Generating Streams - Stream.generate()
Collector and Stream.collect - collecting Streams
The Collectors.toList(), Collectors.toSet(), and Collectors.toCollection() methods
Collecting into Map - Collectors.toMap()
Joining Stream of strings - Collectors.joining()
Grouping elements of Stream - Collectors.groupingBy()
Chapter 12: Getting Started with Arrow
Function composition
Partial application
Binding
Reverse
Pipes
Currying
Differences between the currying and partial application
Logical complement
Memoization
Partial functions
Identity and constant
Optics
Configuring Arrows code generation
Generating lenses
Chapter 13: Arrow Types
Option
Arrow's type hierarchy
Either
Monad transformers
Try
State
Corecursion with State
Appendix: Kotlin's Quick Start
Writing and running Kotlin
Kotlin online
On your console.
Installing SDKMAN
Installing Kotlin through SDKMAN
Kotlin's REPL
Compiling and executing Kotlin files
Using Gradle
Install Gradle through SDKMAN
Creating a distributable Gradle command
Creating a Gradle project file
Creating our Hello World code
Using IntelliJ IDEA or Android Studio
Importing Gradle files with IntelliJ IDEA
Basic Kotlin syntax
General features
Packages
String concatenation and interpolation
Comments
Control structures
if expression
when expression
for loop
while and do loops
Going further
Other Books You May Enjoy
Index.
Notes:
Includes index.
Description based on online resource; title from PDF title page (EBC, viewed March 22, 2018).
OCLC:
1028217144

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account