You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Make Rules store a second function for updating (#42)
Now `Rule`s store two things: one callable thing, which is used for
evaluating the rule, and one other thing, which can be `nothing` or a
function with the signature `u(value, args...)` that evaluates the rule
for the given arguments and adds the result to `value`, doing so in
place when possible.
The advantage of this is that we can more easily define custom ways of
accumulating the results of rules, and we can even share intermediate
steps between the regular rule evaluation and custom updating. As a
test/proof of concept, the `rrule` for `svd` now also has an updating
function that handles `NamedTuple`s appropriately.
0 commit comments