On Thursday, 31 January 2019 at 14:42:43 UTC, Atila Neves wrote:
[snip]
I've never had a need to use complicated values, so I haven't
coded that.
If presented with an example, I think there's a high chance I'd
consider it an anti-pattern.
I was thinking about something like what is in one of mir's sum
unittests
https://github.com/libmir/mir-algorithm/blob/deb64093afa7f934956c1568358444a803d2240c/source/mir/math/sum.d#L1587
The code builds up a bunch a tuple of tuples with each containing
an array and a value that the array is supposed to sum to. It
then runs through them all with a foreach loop.
Here's another example:
https://github.com/libmir/mir-algorithm/blob/deb64093afa7f934956c1568358444a803d2240c/source/mir/math/sum.d#L1762
[snip]
I tried by using examples, but without knowing what's not clear
it's hard for me to know what to do about it.
I was just thinking like some more real-world examples of how you
have used it. The readme.md is good!