3 ms·
Right, that would be a valid answer too! Unfortunately it has very bad termination properties and is also quite inefficient when larger numbers are involved.
by falsissime 7y ago
Right, that would be a valid answer too! Unfortunately it has very bad termination properties and is also quite inefficient when larger numbers are involved.
And yet, there is a further possibility why not say `when(nonvar(X), integer(X))`. One system tried to go that path: Mu- and Nu-Prolog. However, the practical result was that an erroneous predicate just succeeded and you got an answer with tons of constraints (at that time in that context called floundering goals). A lot of research was put into detecting such flounders, but nothing came out of this effort that is in current use.