KIO Actions Status Release

A simple, lightweight IO monad implementation for Kotlin inspired to the effect-rotation based ZIO library for Scala.

Blog posts:

Introducing KIO:

Comprehension-like syntax:


Many functional programming languages (like Clojure and F#), even if they could (more or less) support the Haskell typeclasses-like FP approach, doesn’t rely on it in order to provide a functional programming environment. Instead, they just rely on the most important pillars of functional programming that are referential transparency and immutability, usually complemented with the use of algebraic data types (ADTs).

Kotlin already provides many tools that can help the developers to stick with these principles, like data classes, sealed classes and immutable variables (val). The two most notable missing pieces are a way to easily handle referential transparency when side effects are involved and an error handling alternative to exceptions. KIO is a lightweight IO implementation that tries to fill this gap without aspiring to provide all the classic Haskell/Scala typeclass categories. If you are looking for this type of library, take a look at Arrow instead.


KIO provides a IO monad-like implementation specific for Kotlin with the following features:

Also some utility methods are available for lists and null-handling.

Maven configuration



Getting started

You can find some documentation in order to start with KIO here.