Skip to content

jaymoid/railway-oriented-programming-kotlin

Repository files navigation

Railway Oriented Programming - The Kotlin Kata!

This kata is based on the awesome talk by Scott Wlaschin.

The talk shows how techniques found in functional programming, allow your code to explain it's logic clearly, without having to litter it with "if-then-else" soup, complicated error handling, and try/catch/finally blocks.

To watch the talk, follow the links on this page: https://fsharpforfunandprofit.com/rop/

This Kata gets you to:

  • implement the data types for "one track" and "two track" railway programming.
  • implement the functions Scott uses in the talk to write your business logic, without having to worry about wiring in all the error cases.

Where do I start?

  1. Clone the repo

  2. Open the project in your IDE (I assume you have Kotlin installed)

  3. Navigate to src/test/Part1_createOption.kt

Why have I made this Kata?

Functional programming can seem daunting. The field of study is massive, so I wanted to introduce some of the concepts with some simple examples and code. I think Scott's talk is brilliant and demonstrates another one of the great reasons to adopt function programming.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages