Write the Core
In this chapter, you’re going to build onto the clock project you created in Chapter 5, Build the Clock’s Circuit. If you missed that instruction, go back and create the project now. Once you’ve done so, we’ll start to work on your project’s core.
Functional cores express complicated application logic by using convenient data structures and composing functions to transform those structures one small step at a time. Cores control complexity by allowing the simplest compositions, without the need to capture failure. In Elixir programs, cores allow composition with pipes, often using the CRC pattern.
Though our core won’t deal with hardware per se, it will need to produce data the hardware can consume. Eventually, we’ll use a library ...
Get Build a Binary Clock with Elixir and Nerves now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.