Digital circuit simulator in Haskell (SICP 3.3)
Summary
The article walks through implementing a digital circuit simulator in Haskell inspired by SICP, using IORef for mutable wires, an observer pattern, and a global agenda for scheduling. It builds basic gates and adders, demonstrates how to compose components, and discusses the trade-offs of mutable state and the idea of purifying the simulation in a future article.