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
{{ message }}
This repository was archived by the owner on Aug 15, 2018. It is now read-only.
I've come to dislike how I named the/2. For one, it makes it sound like a variable has only one value. That's confusing in code like
the(integer, X),
member(X, [1,2,3,4]),
I wonder if var(X, Type) would be better. That looks a lot like a variable declaration. It also puts the type name after the variable, which matches the PlDoc format: X:type.
var(X, integer),
member(X, [1,2,3,4]),
There's still a little bit of confusion because var(X) fails if X is not a variable. However, var(X,Type) succeeds as long as X has the proper type.