3 ms·
Obviously I can’t see the business logic but I would express this (or what I believe I understand of it) as a fold that accumulates a map of structures which or
by thenewwazoo 5y ago
Obviously I can’t see the business logic but I would express this (or what I believe I understand of it) as a fold that accumulates a map of structures which organize the invoice(s) alongside the orders somehow. I suspect that would result in a kind of “inversion” of responsibility that might be unfamiliar at first, but may well result in a clearer relationship between the data elements to someone new to the code (and may make refactoring a lot easier).