Hi, so I’m trying to implement a backward chaining in an expert system and I just can’t seem to figure out how to get a bool value which represents “are every elements in the list present in the other list”.
Also, is it possible to override parameters values? Basicaly, if I get true at the previous step, I need to add a value in the type’s list I received by parameters and then start using the version of the type that contains this new value.
if (List.for_all (fun value →
if (valueIsFact value facts) then true
else if (recFunc value system) then true
else false) (listOfValues))
then (begin system := (addFact newValue system); true; end) else false