🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.lang.prolog
Article #704

Defining var(X).

#704
From: bhyde
Date: Thu, 26 Jun 1986 20:15
17 lines
912 bytes
The prolog that I use loads a library of standard
definitions upon start up.  I got to wondering 
what things are truly primative in prolog.  Somebody
asked recently if the predicate var can be defined
"logically."  How's this?
  var(X) :- not(not(X=1)), not(not(X=2).

Now can we define the operator "=="?  Notable is
that:
   : X == X?
   true.
   : X == Y?
   false.
At least in some implementations.

    - ben hyde, cambridge mass.
Technical Details
Message-ID: <5300003@inmet>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!think!ima!inmet!bhyde

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!caip!think!ima!inmet!bhyde
From: bhyde@inmet.UUCP
Newsgroups: net.lang.prolog
Subject: Defining var(X).
Message-ID: <5300003@inmet>
Date: Thu, 26-Jun-86 16:15:00 EDT
Article-I.D.: inmet.5300003
Posted: Thu Jun 26 16:15:00 1986
Date-Received: Sat, 28-Jun-86 03:54:37 EDT
Lines: 17
Nf-ID: #N:inmet:5300003:000:437
Nf-From: inmet.UUCP!bhyde    Jun 26 16:15:00 1986