Pure Functional Stream processing in Scala: Cats and Akka – Part 2

In the last post, we saw how to combine pure functions running in IO and Akka streams using .mapAsync and .unsafeToFuture In order to make it easier to work with IO in Akka Streams, we can write some helpers to add a method on Streams that automatically run the IO inside the flow. This will… Continue reading Pure Functional Stream processing in Scala: Cats and Akka – Part 2

Pure Functional Stream processing in Scala: Cats and Akka – Part 1

In Scala you can write pure functional code, similar to Haskell or other pure functional languages, but you’re not obligated to. Wikipedia categories Scala as an impure Functional language. FP purists view this as a weakness of Scala, but others view the option of “cheating” pureness as an acceptable choice sometimes. Even if you can… Continue reading Pure Functional Stream processing in Scala: Cats and Akka – Part 1