Functional Programming in Kotlin with Arrow


Course Number: MBL-230

Duration: 2 days (13 hours)

Format: Live, hands-on

Kotlin with Arrow Training Overview

This Functional Programming in Kotlin with Arrow training course teaches developers how to enhance their functional Kotlin programming skills and get the most out of additional capabilities provided by the Arrow library.

Location and Pricing

This course is taught as a private, live online class for teams of 3 or more. All our courses are hands-on, instructor-led, and tailored to fit your group’s goals and needs. Most Accelebrate classes can be flexibly scheduled for your group, including delivery in half-day segments across a week or set of weeks. To receive a customized proposal and price quote for online corporate training, please contact us.

Objectives

  • Use advanced operations, such as Traversal and Applicatives
  • Use functional types (such as Either, Validated, and State) to improve safety and maintainability.
  • Use Optics to work with deeply nested immutable data
  • Compose operations efficiently via suspending functions
  • Design and implement sample applications, which follow the declarative and immutable FP style
  • Implement algorithms using the more advanced FP operators, such as traverse and bimap
  • Use effects to produce polymorphic programs that can be executed across multiple environments

Prerequisites

All attendees must have several years of Kotin development experience. They must have experience applying the standard FP operators (filter, map, flatMap, reduce, etc.) to solve real-world problems.

Outline

Expand All | Collapse All

Introduction
Kotlin FP Fundamentals (Optional)
  • Working with function references and lambdas
  • Lambdas with receiver and patterns for DSL’s
  • Declaring functions as parameters and return types
  • Understanding Partial Invocation and Currying
  • Choosing between code blocks and local functions
  • Common misunderstandings regarding enclosure
Advanced FP Concepts (Examples from Arrow 0.12)
  • Programming using Algebraic Data Types in Kotlin
  • Adding operators to data structures via Typeclasses
  • Abstracting generic types via Higher Kinded Types
  • Functional composition and rules for monadic types
  • Combining different monadic types via Transformers
Functional Types Supported in Arrow
  • The Identity type and situations where it is useful
  • Why the Option and Try types are not needed in Kotlin
  • Modeling exceptions and cached/default values via Either
  • Collecting errors via the Validated type and Semigroups
  • Using the Reader type to build a record across invocations
  • Using the State / Writer type to pass data between calls
  • Arrow wrappers to Kotlin collections and NonEmptyList
Additional Operators Supported by Arrow
  • Inverting collections of monadic types via traverse
  • Using Applicatives to handle multiple type instances
  • Composition in Arrow using suspending functions
  • Kleisli as an alternative means of composition
  • Applying fold, bimap, and swap to Monadic Types
Manipulating Immutable Data with Optics
  • Problems posed by deep nesting in immutable collections
  • Advantages and limits of data classes and the copy method
  • Using Optics to focus on specific fields in nested data
  • Different forms of Lens in Arrow, and how to create them
  • Maintaining codebases that use the Optics library heavily
Building Purely Functional Designs with Effects
  • Why pure functions are desirable but side effects inevitable
  • How the IO type can be used to separate pure from impure code
  • Effects libraries, delimited continuations, and effectful coding
  • Understanding Polymorphic Programs within functional designs
  • How Arrow 1.x uses suspending functions instead of an IO type
  • Emerging patterns for building applications using Effects
Conclusion

Training Materials:

All attendees receive comprehensive courseware.

Course outline and materials are copyrighted and owned by Instil Software.

Software Requirements:

  • Windows or Mac minimum 8 GB RAM
  • Android Studio installed
  • Provided lab files from Accelebrate


Learn faster

Our live, instructor-led lectures are far more effective than pre-recorded classes

Satisfaction guarantee

If your team is not 100% satisfied with your training, we do what's necessary to make it right

Learn online from anywhere

Whether you are at home or in the office, we make learning interactive and engaging

Multiple Payment Options

We accept check, ACH/EFT, major credit cards, and most purchase orders



Recent Training Locations

Alabama

Birmingham

Huntsville

Montgomery

Alaska

Anchorage

Arizona

Phoenix

Tucson

Arkansas

Fayetteville

Little Rock

California

Los Angeles

Oakland

Orange County

Sacramento

San Diego

San Francisco

San Jose

Colorado

Boulder

Colorado Springs

Denver

Connecticut

Hartford

DC

Washington

Florida

Fort Lauderdale

Jacksonville

Miami

Orlando

Tampa

Georgia

Atlanta

Augusta

Savannah

Hawaii

Honolulu

Idaho

Boise

Illinois

Chicago

Indiana

Indianapolis

Iowa

Cedar Rapids

Des Moines

Kansas

Wichita

Kentucky

Lexington

Louisville

Louisiana

New Orleans

Maine

Portland

Maryland

Annapolis

Baltimore

Frederick

Hagerstown

Massachusetts

Boston

Cambridge

Springfield

Michigan

Ann Arbor

Detroit

Grand Rapids

Minnesota

Minneapolis

Saint Paul

Mississippi

Jackson

Missouri

Kansas City

St. Louis

Nebraska

Lincoln

Omaha

Nevada

Las Vegas

Reno

New Jersey

Princeton

New Mexico

Albuquerque

New York

Albany

Buffalo

New York City

White Plains

North Carolina

Charlotte

Durham

Raleigh

Ohio

Akron

Canton

Cincinnati

Cleveland

Columbus

Dayton

Oklahoma

Oklahoma City

Tulsa

Oregon

Portland

Pennsylvania

Philadelphia

Pittsburgh

Rhode Island

Providence

South Carolina

Charleston

Columbia

Greenville

Tennessee

Knoxville

Memphis

Nashville

Texas

Austin

Dallas

El Paso

Houston

San Antonio

Utah

Salt Lake City

Virginia

Alexandria

Arlington

Norfolk

Richmond

Washington

Seattle

Tacoma

West Virginia

Charleston

Wisconsin

Madison

Milwaukee

Alberta

Calgary

Edmonton

British Columbia

Vancouver

Manitoba

Winnipeg

Nova Scotia

Halifax

Ontario

Ottawa

Toronto

Quebec

Montreal

Puerto Rico

San Juan