I like this builder pattern. Seems pretty similar to <a href="https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;optparse-applicative" rel="nofollow">https:&#x2F;&#x2F;hackage.haskell.org&#x2F;package&#x2F;optparse-applicative</a> as well, where you continually apply small functions to a data structure to end up with a big one.<p>Since Elixir doesn&#x27;t have mandatory types, I assume there&#x27;s no way to verify at compile time that it&#x27;s a &quot;valid&quot; email (Has a recipient, and a from addr, whatever other requirements), and you&#x27;d have to check that in tests or at runtime?