舉報(bào)

會(huì)員
Functional Kotlin
Functionalprogrammingmakesyourapplicationfaster,improvesperformance,andincreasesyourproductivity.Kotlinsupportsmanyofthepopularandadvancedfunctionalfeaturesoffunctionallanguages.ThisbookwillcovertheA-ZoffunctionalprogramminginKotlin.ThisbookbridgesthelanguagegapforKotlindevelopersbyshowingyouhowtocreateandconsumefunctionalconstructsinKotlin.Wealsobridgethedomaingapbyshowinghowfunctionalconstructscanbeappliedinbusinessscenarios.We’lltakeyouthroughlambdas,patternmatching,immutability,andhelpyoudevelopadeepunderstandingoftheconceptsandpracticesoffunctionalprogramming.IfyouwantlearntoaddressproblemsusingRecursion,Koltinhassupportforitaswell.You’llalsolearnhowtousethefunKtionalelibrarytoperformcurryingandlazyprogrammingandmore.Finally,you’lllearnfunctionaldesignpatternsandtechniquesthatwillmakeyouabetterprogrammer.Bytheendofthebook,youwillbemoreconfidentinyourfunctionalprogrammingskillsandwillbeabletoapplythemwhileprogramminginKotlin.
最新章節(jié)
- Leave a review - let other readers know what you think
- Other Books You May Enjoy
- Going further
- while and do loops
- for loop
- when expression
品牌:中圖公司
上架時(shí)間:2021-06-24 18:03:05
出版社:Packt Publishing
本書數(shù)字版權(quán)由中圖公司提供,并由其授權(quán)上海閱文信息技術(shù)有限公司制作發(fā)行
- Leave a review - let other readers know what you think 更新時(shí)間:2021-06-24 19:15:59
- Other Books You May Enjoy
- Going further
- while and do loops
- for loop
- when expression
- if expression
- Control structures
- Comments
- String concatenation and interpolation
- Packages
- General features
- Basic Kotlin syntax
- Importing Gradle files with IntelliJ IDEA
- Using IntelliJ IDEA or Android Studio
- Creating our Hello World code
- Creating a Gradle project file
- Creating a distributable Gradle command
- Install Gradle through SDKMAN
- Using Gradle
- Compiling and executing Kotlin files
- Kotlin's REPL
- Installing Kotlin through SDKMAN
- Installing SDKMAN
- On your console
- Kotlin online
- Writing and running Kotlin
- Kotlin's Quick Start
- Summary
- Corecursion with State
- State
- Try
- Monad transformers
- Either
- Arrow's type hierarchy
- Option
- Arrow Types
- Summary
- Generating lenses
- Configuring Arrows code generation
- Optics
- Identity and constant
- Partial functions
- Memoization
- Logical complement
- Differences between the currying and partial application
- Currying
- Pipes
- Reverse
- Binding
- Partial application
- Function composition
- Getting Started with Arrow
- Summary
- Grouping elements of Stream – Collectors.groupingBy()
- Joining Stream of strings – Collectors.joining()
- Collecting into Map – Collectors.toMap()
- The Collectors.toList() Collectors.toSet() and Collectors.toCollection() methods
- Collector and Stream.collect – collecting Streams
- Generating Streams – Stream.generate()
- Creating a Stream by passing elements – Stream.of()
- Creating empty Streams – Stream.empty()
- Stream Builder
- Stream factory methods
- Primitive streams
- Working with Streams
- Collections versus Streams
- Introduction to Streams
- Working with Streams in Kotlin
- Summary
- Applicatives
- Monads
- Functors
- Functors Applicatives and Monads
- Summary
- Subscribing and disposing
- Subscriber – the Observer interface
- Iterator<T>.toObservable
- The Observable.from methods
- The Observable.create method
- How Observable works
- Observables
- Comparing the Pull mechanism with the RxJava Push mechanism
- Downloading and setting up RxKotlin
- Getting started with RxKotlin
- Functional reactive frameworks for Kotlin
- The Reactive Manifesto
- Functional reactive programming
- Combining FP with OOP
- Functional Programming and Reactive Programming
- Summary
- Grouping collections
- The zip function
- The take functions
- The drop functions
- The flatMap function
- The filter function
- The map function
- Data operations in a collection
- Map and MutableMap
- Set and MutableSet
- List and MutableList
- The advantages of a collections framework
- An introduction to collections
- Collections and Data Operations in Kotlin
- Summary
- Actors
- Mutexes
- Thread safe structures
- Switching contexts
- Managing mutable state
- Channel pipelines
- Channels
- Coroutine context
- Coroutines
- Promises with Kovenant
- Java Futures
- Callbacks
- Synchronous implementation
- Using coroutines in real life
- Hello coroutine world!
- Understanding JVM threads
- Introduction to coroutines
- Asynchronous Programming with Coroutines
- Summary
- Class delegation
- Local delegates
- Custom delegation
- Delegated map
- The power of veto – Delegates.vetoable
- Observing property value change with Delegates.Observable
- The lazy function
- The Delegates.notNull function and lateinit
- Property delegation (standard delegates)
- Delegates in Kotlin
- Understanding delegation
- Introduction to delegation
- Delegates in Kotlin
- Summary
- Recursion and corecursion
- Inline restrictions
- Inline functions
- Creating a DSL
- Type-safe builders
- Unary operators
- Indexed access
- Invoke
- Binary operators
- Operator overloading
- Infix functions
- Extension functions for objects
- Extension functions with conflicting names
- Extension functions as members
- Extension functions and inheritance
- Extension functions
- Default parameters
- Named parameters on high-order functions
- Named parameters
- Lambda
- vararg
- Parameters
- Single-expression functions
- More on Functions
- Summary
- Pure functions
- Side effects
- Pure functions and side effects
- High order functions
- Function as property
- Lambda
- Function types in functional programming
- Nested functions
- Default arguments
- Extension functions
- Returning two values from a function
- Functions in Kotlin
- Functions Function Types and Side Effects
- Summary
- The disadvantages of immutability
- Pure functions
- Compiler optimization
- Caching
- Failure atomicity
- Referential transparency
- Low coupling
- Thread safety
- The advantages of immutability
- Immutable collections
- Immutable values
- Immutable reference (referential immutability)
- Types of immutability
- Compile time constants
- The difference between var and val
- Implementing immutability in Kotlin
- What is immutability?
- Immutability - It's Important
- Summary
- Implementing a functional list
- Functional collections
- Lazy evaluation
- Recursive functions
- Pure functions
- First-class and higher-order functions
- Basics concepts
- What is functional programming?
- Getting Started with Functional Programming
- Summary
- Enum
- Annotations
- Destructuring methods
- The copy() method
- Canonical methods
- Data classes
- Other types
- The Nothing type
- The Unit type
- Minimum common types
- The Any type
- Kotlin's type system
- The (!!) operator
- The Elvis (?:) operator
- Safe calls
- Checking for non-null types
- Checking for null
- Nullable types
- Type alias
- Generics
- Companion objects
- Object declarations
- Objects
- Interfaces
- Abstract classes
- Inheritance
- Methods
- Properties
- Classes
- Kotlin – Data Types Objects and Classes
- Reviews
- Get in touch
- Conventions used
- Download the color images
- Download the example code files
- To get the most out of this book
- What this book covers
- Who this book is for
- Preface
- Packt is searching for authors like you
- About the reviewer
- About the authors
- Contributors
- PacktPub.com
- Why subscribe?
- Packt Upsell
- Dedication
- Title Page
- coverpage
- coverpage
- Title Page
- Dedication
- Packt Upsell
- Why subscribe?
- PacktPub.com
- Contributors
- About the authors
- About the reviewer
- Packt is searching for authors like you
- Preface
- Who this book is for
- What this book covers
- To get the most out of this book
- Download the example code files
- Download the color images
- Conventions used
- Get in touch
- Reviews
- 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
- 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
- Summary
- 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
- Pure functions
- The disadvantages of immutability
- Summary
- 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
- Pure functions
- Summary
- More on Functions
- Single-expression functions
- Parameters
- vararg
- Lambda
- Named parameters
- Named parameters on high-order functions
- Default parameters
- Extension functions
- 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
- Summary
- 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
- Summary
- 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
- Summary
- 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
- Summary
- 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<T>.toObservable
- Subscriber – the Observer interface
- Subscribing and disposing
- Summary
- Functors Applicatives and Monads
- Functors
- Monads
- Applicatives
- Summary
- 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()
- Summary
- 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
- Summary
- Arrow Types
- Option
- Arrow's type hierarchy
- Either
- Monad transformers
- Try
- State
- Corecursion with State
- Summary
- 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
- Leave a review - let other readers know what you think 更新時(shí)間:2021-06-24 19:15:59