Maybe the problem falls under the āmissing steadfastnessā umbrella.
I donāt think the compiler should bother about this case (too easy ), because there are so many more difficult points when it come to coroutining (attributed variables), so extensively used today.
Not really. It is just that findall/3 first uses the first argument and the goal, backtracking over all solutions. In the end, the first argument is unchanged (i.e., still a variable if it was one to begin with) and thus we can reuse it for the second stage (collecting the answers). It is not wrong. It should be considered bad style. Not much different that reusing a variable in imperative coding for two totally different purposes instead of introducing a new variable and assume that the compiler reuses the same location if the scopes do not overlap (and even if not, the damage is really small). So yes, a linter issue.
It is just a file type it doesnāt handle. Only the request ends in a HTTP 500, the server remains happy.
The not-not (+\ +\) leaves X uninstantiated, so X=4 succeeds. (\+ \+ Goal is equivalent to calling Goal and then removing all instantiations that were created within Goal; without not-not, X=3, X=4 fails.)
I heard from A. Colmerauer directly, who also had invented the notorious ānegationā \+ by CUT (!)
\+(X) :- X, !, fail.
\+(X).
that he was very proud of this negation. At that time, it was thought negation is impossible because of monotonicity of pure prolog. He cleared the critics by inventing cut (!) As such, still I like cut, but not so much teacherās attitude to try to hide the cut from the prolog beginner.