Predictable Code in Elixir: Expressions as Reducers and Macros
In the first part of this series on maintainable Elixir code, we started by applying rules for code predictability in our code design. We immediately saw an emerging pattern: a series of transformations on state. In this part, we'll explore this pattern further. We'll first learn how to write expressions as reducers. Then we'll use metaprogramming to make use of reducers and enforce code style seamlessly. Finishing up, we'll see an example where all the pieces fit together. Let's get going!