🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #4138

Re: incrementing values

#4138
From: Michael Coleman
Date: Fri, 02 Feb 1990 04:45
22 lines
1347 bytes
In article <17467@megaron.cs.arizona.edu> debray@cs.arizona.edu (Saumya K. Debray) writes:
>This is an excerpt from an article posted recently to another newsgroup:
>| 	increment(Variable) :-
>| 		retract(value(Variable, OldValue)),
>| 		NewValue is OldValue + 1,
>| 		assert(value(Variable, NewValue)).
>Comments?

I saw this in the other newsgroup.  My jaw dropped when I read it.
Incredible!  Kind of makes you wonder how this poster would implement, say,
quicksort, or nested "for" loops in Prolog.

Every once in a while something comes along to help us remember why languages
like COBOL, Fortran, and friends still reign supreme.

Sigh.

--Mike

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
try.            %% "When at first you 
try :- try.     %%  don't succeed, ..."                  (coleman@cs.ucla.edu)
Technical Details
Message-ID: <31462@shemp.CS.UCLA.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!brutus.cs.uiuc.edu!jarthur!uci-ics!ucla-cs!coleman
References: <17467@megaron.cs.arizona.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!rpi!brutus.cs.uiuc.edu!jarthur!uci-ics!ucla-cs!coleman
From: coleman@maui.cs.ucla.edu (Michael Coleman)
Newsgroups: comp.lang.prolog
Subject: Re: incrementing values
Message-ID: <31462@shemp.CS.UCLA.EDU>
Date: 2 Feb 90 04:45:14 GMT
References: <17467@megaron.cs.arizona.edu>
Sender: news@CS.UCLA.EDU
Reply-To: coleman@cs.ucla.edu (Michael Coleman)
Organization: UCLA Computer Science Department
Lines: 22