Add a reduce argument to those functions, which would take a function that is used to reduce the results from the ancestors before returning the value. This is not that useful for the non-mutating functions, but could be neat to have for the mutating one (descendants!). This way the cache would only take one value instead of the full list of values, which largely reduce the memory usage.
Add a
reduceargument to those functions, which would take a function that is used to reduce the results from the ancestors before returning the value. This is not that useful for the non-mutating functions, but could be neat to have for the mutating one (descendants!). This way the cache would only take one value instead of the full list of values, which largely reduce the memory usage.