Understanding Kleisli: using it to pass context infoKleisli is a term that appears frequently when reading about functional programming. It is an important concept but it is not trivial to grasp. Often it is easier to understand new ideas by putting them into practice, in this blog entry we will see h...6 min read路lrodero.hashnode.devNov 17, 2024
Convert Future instances to cats-effect IOMuch (most?) of the third-parties software that you will have to deal with will not handle asynchronous actions using our beloved IO monad, they will instead use either Scala鈥檚 or Java鈥檚 Future. This brief entry shows how to convert those Futures int...2 min read路lrodero.hashnode.devAug 15, 2024
Micro library for retries in cats-effect using Scala extensionsThis blog entry will show how to add a simple retry mechanism to cats-effect (CE) using Scala 3 extensions. The idea is that whenever we define our IO instances we can also specify that, if they fail and certain conditions are met, they will be autom...6 min read路lrodero.hashnode.devJun 2, 2024
A more intuitive approach to the State Monad in ScalaThe 'Functional programming in Scala' book (aka 'the red book') defines a state transformation as a function with this signature: S => (S, A) where S is a type representing the state of our application and A is the type of the output we get running ...2 min read路lrodero.hashnode.devMay 18, 2024
The dining philosophers problem with Scala 3 and Cats EffectThe dining philosophers problem is a classical concurrency problem. This post shows an example of how you can use Scala 3 and the Cats Effect (CE) libraryto implement a solution of that problem. 馃挕 All code samples can be compiled using scala-cli. T...6 min read路lrodero.hashnode.devMar 24, 2024