>>>>> "MM" == Martin Michlmayr <
t...@cyrius.com> writes:
MM> John implemented --average-lot-prices recently, but you need ledger from
MM> Git.
Yes, given that I recently discovered that I also need a --plopen, I'm now
realizing that both average lot prices and P/L Open are instances of the same
thing: Transforming an aggregate balance according to a formula. There should
be a way of generalizing this so that it becomes easy for others to apply
their own transformations.
I.e., a balance reduction is a function from balance -> balance that applies
some calculation to each entry in the balance based on information gleaned
from the whole balance. Since the value expression language in Ledger doesn't
really deal very well with lists or arrays, C++ is still the easiest language
to write such transformations in.
John