This post is part of the series on functional software architecture
in Kotlin. The first one covered functional
validation, and this part is
about monads. In Kotlin, these are particularly useful when
describing domain workflows that should be separated from the
technical logic for executing these workflows - specifically using small
domain-specific languages (DSLs).
This episode is about how monads actually work. Kotlin has - like many
functional languages - special syntax for this, even though you won‘t
find it under the „M-word“ in the documentation. It‘s hidden behind
the suspend keyword.
Read on...