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
Well it is old restriction of the grounded atoms API. See for example option (2) inside #530 (comment) The problem is that result cannot be returned via argument of the grounded operation. The difference between f1 and f2 is that f2 calls grounded superpose and this call breaks the chain of variable assignments.
It is not fundamental issue and it can be fixed as wrote in #530 (comment) After migration to the minimal MeTTa I believe it should not be complex but it changes the grounded atom API so it is a major change.
@vsbogd Well either way both functions should behave the same way. Personally i would change the way superpose works even it is major change (As we don't have a final version of metta major changes are to be expected). If there is a big argument against that i also woulnd't mind if the way f1 works get changed to be the same as superpose. It would be a bit annoying to write functions in such a way that they always return inputs and then do seperate unification of the input with the updated input returned by the function but it would work. But it's not nearly as clean as allowing superpose to updates it's arguments.
Describe the bug
my understanding was that the below definitions for f1 and f2 should be identical but as we can see in the output they are not.
To Reproduce
Expected behavior
f2 should output the same as f1
Actual behavior
f2 doesn't subsitute the result of the unification in the higher context.
The text was updated successfully, but these errors were encountered: