Solution to jaerlang2/chapter4/exercise3 with many takeaways.