I've seen some answers here that use it and I don't know what it means or how to use it. I's also hard to look for it via a search engine :)
! symbol represents the cut . You can read more about cut here. Also, an example in prolog can be found here.
=:= expression is meaning of exactly equal. such as in JavaScript you can use === to also see if the type of the variables are same. Basically it's same logic but =:= is used in functional languages as Prolog, Erlang.
The = "operator" in Prolog is actually a predicate (with infix notation) =/2 that succeeds when the two terms are unified. Thus X = 2 or 2 = X amount to the same thing, a goal to unify X with 2. The == "operator" differs in that it succeeds only if the two terms are already identical without further unification.
The notation [X|Y] refers to a list whose first element is X and whose tail is Y.
It's the 'not provable' operator. It succeeds if its argument is not provable (and fails if its argument is provable).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With