The Bike Shed cover image

386: Value Objects Revisited: The `Tally` Edition

The Bike Shed

00:00

How to Reduce Objects in a Class

Tally is interesting in that it is both a noun and a verb in English. So the tally method on innumerable returns a hash, which we have been talking about for a while. What becomes really cool about this is that once you have a way of combining two objects together, reduced is a way to just kind of scale that up to an arbitrary number. And so now I've just got this really simple one line in the scary part.

Transcript
Play full episode

Remember Everything You Learn from Podcasts

Save insights instantly, chat with episodes, and build lasting knowledge - all powered by AI.
App store bannerPlay store banner
Get the app