Yet another implementation of 7GUIs in Elm

Iā€™m happy to finally share my implementation of 7GUIs (source) in Elm.

The last two tasks, Circle Drawer and Cells were the most challenging and interesting of the seven tasks. However, I was delighted :smile: to see how effective Elm was at modeling both tasks.

Change propagation for Cells

One of the main highlights for me was figuring out a neat and performant implementation of change propagation for Cells. I modeled it as a directed graph and to figure out the order in which to propagate the changes through the cells I used a topological sort. I also achieved a clean separation of the domain model for the spreadsheet and the UI which allowed me to easily write tests for the spreadsheet. Finally, testing allowed me to come up with a well-crafted test case that breaks naive implementations of change propagation.


Bonus points for the top-sort!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.