Since the nesting was just two levels deep, I handled immutability manually. Also, I tried to keep it as simple as possible without introducing any other libraries so that anyone could get a simple, ready-to-work-with example up and running. I do see your point though as the method got too bulky due to all that repetition. I’ll try to incorporate it into this without making it too complicated. Thanks for the suggestion!

I handle web. Yes, the whole internet.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store