Kotlin 3- Introduction to Arrow 4- Deep dive into Arrow Data Types: Option, Either, Try 5- Deep dive into Arrow Type Classes: Functor, Monad, Applicative 6- More FP Concepts 7- Sample Apps
style of building the structure and elements of computer programs—that treats computation as the evaluation of mathematical functions and avoids changing-state and mutable data. Its main focus is on “what to solve” in contrast to an imperative style where the main focus is “how to solve”. Source: Wikipedia
Pure function: 1- Provides the same output for the same input at all times. 2- Works only on the parameters supplied to it, doesn’t modify anything outside function.
first class citizens. Functions can be passed to other functions, returned from other functions and functions can be assigned to a variable. Examples: Scala, Haskell, Kotlin.
that provides Typed Functional Programming in Kotlin. Introduced in 2017. Fusion of 2 most popular Kotlin libraries: Kategory and funcKTionale. Documentation available at : https://arrow-kt.io/ Latest release: 0.7.3
type A. If the value of type A is present, the Option<A> is an instance of Some<A>, containing the present value of type A. If the value is absent, the Option<A> is the object None.
users where entities like Name, Date-of-Birth are optional. Searching the user by name, would results in a type Optional. Can also be used in when clause of Kotlin.
then routes towards success or failure. A Try instance where the operation has been successful, which is represented as Success<A> a Try instance where the computation has failed is represented with a Throwable, which represents Failure.
value using map. Here, ‘f’ is a function transforming the wrapped value. And map() returns the transformed value wrapped in same context. Present at: Arrow.typeclasses.Functor
functions. Compose is an infix function. Compose takes the value from the function on the right, applies it to the function on the left and continues to pass it to the left.
A function that is memorized behaves as a normal function, but stores the result of previous computations associated with the parameters supplied to produce that result.
effects to a single point on your system to keep the rest of the architecture completely pure. Be clear on the concepts of different data types and their differences. Be clear on the concepts of different type classes and incorporate them in your computations accordingly.