Closed zchmielewska closed 11 months ago
Implemented in 652da2df49d983fab82aedf48026463437eb34db
Bidirectional recursion is disallowed because it does not seem to be used within actuarial cash flow models.
However, if a user provides a real-life example that it is needed then it will be implemented.
In actuarial models, it's common to use iteration/recursion but in one direction (usually forward).
However, the user might define a model variable that uses bidirectional iteration.
The package should either:
Example of bidirectional iteration within the variable:
Currently, the package calculates the incorrect values. Model assumes it's forward recursion because of the existence of
my_var(t-1)
in the definition.While fixing this issue, take into account cycles.