e.near Tech Blog

Hands on function composition with monad transformers

When using functional programming languages like Scala, developers spend a lot of their time composing functions and effects. One of the most common ways to express composability is to use monads. However, composing functions that return different monads can become quite messy and, without the right tools, quickly turn into a massive headache. That’s where Monad Transformers, which are the main focus of this post, come in handy!

Building a lexer and parser with Scala's Parser Combinators

As part of an ongoing project at e.near, one of our Scala teams was recently tasked with a requirement to build an interpreter for executing workflows which are modelled with a textual DSL. These workflows had to be validated for errors, compiled to a simpler bytecode-like representation and stored, in order to be interpreted with as little overhead as possible.