Closed vsbogd closed 4 months ago
Thanks for checking Nil, I am sorry for that. It is not normal and this happens because tuples of variables are matched with random types. In this case ($x $y)
tuple matches with (: (@kind atom) DocKindAtom)
and (: (@kind function) DocKindFunction)
type, which causes two different interpretation to be returned. It can be seen by executing:
!(get-type (($x $y) $y))
[(DocKindAtom %Undefined%), (DocKindFunction %Undefined%)]
The effect above is raised as issue #235
I see, I can live with that for now, so if the duplicate issue is too difficult to fix now I'm happy to have that merged.
I don't want to merge it now, I would like to finish discussion in #642 first. Please see possible solution https://github.com/trueagi-io/hyperon-experimental/issues/642#issuecomment-2061567989
@ngeiswei , should be fixed now, please try it.
With the latest revision 23a22d28
(= ((W $x) $y) (($x $y) $y))
!(($x $y) $y)
still spawns MeTTa in a infinite recursion (with variable_operation
disabled).
Oh, these are new commits, let me check then!
It behaves as expected on my end.
It's awesome to see these old issues being knocked down one by one! Thanks!
Quick fix for #642