FP in Kotlin with Arrow with Jorge Castillo

24th May 2021   4 days

English   Online Course

£875 £399 + VAT

View Schedule & Book More dates available

Next up:


Kotlin has quickly become a major player in the Functional Programming arena for its streamlined features, ease of compatibility and versatility, as well as official support by Google for Android development.

Join renowned Kotlin expert Jorge Castillo to learn the fundamentals of Kotlin, a popular language with multiplatform support and learn to incorporate functional programming using Arrow.

With its multiplatform capabilities and increasing popularity for backend development, Kotlin allows you to transition your code and logic to different platforms.

You’ll learn the fundamentals and be introduced to Arrow, a popular open-source library that brings the ability to use functional programming in Kotlin by serving as a companion to the Standard Library.

This course combines virtual classroom lectures and hands-on guided exercises designed to help attendees gain the tools necessary to develop and execute functional programming projects in the real world.

Upon completion of this Functional Programming in Kotlin with Arrow course you’ll be well on your way to developing and executing your own projects.

Online Learning at Skills Matter

This course will be offered virtually over 4 half-day session.

Our virtual courses are designed to be as efficient as in-person instruction but provide increased inclusivity from the comfort of your own setting.

You’ll join Jorge and participants from around the globe in a virtual classroom where you’ll utilize collaboration tools like Zoom, Slack, and the 47 Degrees Academy IDE to learn, discuss, and evaluate real-world scenarios in development.

Learn how to:

This intensive course will cover:

  1. Functional Programming essential
  2. Domain Modeling and ADTs
  3. Immutable Data and Optics
  4. Error-Handling and Data Validation
  5. Diving into Suspend
  6. Arrow Fx Coroutines
  7. Resource Safety
  8. Functional Streams

About the Author

Jorge Castillo

Jorge Castillo is the Kotlin/Android tech lead at 47 Degrees. He comes from a heavily Android-oriented background, having also worked with Functional Programming more extensively during the later years.


Modules/topics covered

  • Lesson 1: Functional Programming
    • Functional programming essentials
      • Fundamentals of FP. What is it, what is it good for
      • Purity, referential transparency, substitution model
      • Side effects
      • Higher order functions

  • Lesson 2: Domain Modeling and ADTs
    • Modeling your program’s data through the concept of Algebraic Data Types
      • Kotlin type system and its impact on how compiler understands code
      • Algebraic Data Types
      • Modeling program choices by ADTs
      • The Nothing bottom type and inference
      • Kotlin standard library product types
      • Arrow product and sum types
      • Arrow Coproducts
      • Arrow Union types (powered by Arrow Meta)
      • Refined types (powered by Arrow Meta)

  • Lesson 3: Immutable Data and Optics
    • How to optimize reusability and composition for immutable data structures using Optics
      • Understanding optics as a path for reading / modification
      • How optics improve Kotlin standard library copy syntax
      • Going over all the available types of optics
      • Optics composition and reusability

  • Lesson 4: Error-Handling and Data Validation
    • Learning how to handle errors in our programs.
      • Option datatype
      • Either datatype
      • Computational bias: Having a happy path in our types
      • Fail fast vs error accumulation strategies
      • ValidatedNel as a mean to accumulate errors
      • How to handle errors on concurrent contexts

  • Lesson 5: Diving into Suspend
    • Suspend from Kotlin stdlib, what it represents, how it works
    • What does suspend translate to at compile time (CPS)
    • How we leverage that with Arrow Fx Coroutines
    • The power of delimited continuations, "the mother of all monads"
    • Equivalence between wrapped approaches and Kotlin suspend
    • Removing the need for IO wrappers
    • Suspend as a mean to track side effects at compile time

  • Lesson 6: Arrow Fx Coroutines
    • A pure functional implementation of Kotlin suspend system
    • Handling errors in concurrent contexts by leveraging suspend + Either
    • Concurrency solved by Arrow Fx Coroutines operators
    • Collaborative cancellation checked by all operators
    • Cancellable effects
    • Evaluating effects on arbitrary contexts
    • Fibers as lightweight threads: ForkAndForget / ForkConnected / ForkScoped
    • Concurrent resource safety
    • Handling concurrent mutable state
    • Parallelization operators
    • Traversing effects
    • Racing effects

  • Lesson 7: Resource Safety
    • Resource
    • Bracket

  • Lesson 8: Functional Streams
    • Lightweight streams
    • Pull based - key differences vs other known streaming libraries
    • Built-in backpressure
    • Chunk based streams
    • Embedded effects
    • Stream interruption
    • Queues
    • Lightweight stream apis
    • Safely streaming resources with automatic scoping



This course is for developers who want to straighten their knowledge in Kotlin.


One year of experience using Kotlin or similar Functional Programming-oriented languages.