Article View: comp.lang.prolog
Article #2881Re: self-replicating programs
From: Grado
Date: Mon, 23 Nov 1987 06:46
Date: Mon, 23 Nov 1987 06:46
27 lines
1469 bytes
1469 bytes
In article <309@udccvax1.acs.udel.EDU> chiefdan@vax1.acs.udel.EDU (Newsgroups) writes:
>> There was an interesting discussion about self-replicating
>>programs a while back in this newsgroup. Umm, can people send me what
>>I'm trying to show that the code for
>>Prolog can be a lot shorter. Please, help me, <sob>...
>> -ag hirai
>I'd have voted for doing the program in lisp. You know...
>
>(defun x() (pp x))
>
>Anyhow, I'm a novice in prolog and would appreciate knowing an answer for this.
>chiefdan
By analogy, if you accept the above Lisp program as valid, I guess you can also
accept the following Prolog code:
x :-
listing(x/0).
provided you don't have another clause for x of same arity. Or any other
arity if you don't use x/0.
Dull, isn't it?
I am would like to see the mentioned previous postings.
Vicid H) T
Technical Details
Message-ID:
<7045@pur-ee.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!rutgers!iuvax!pur-ee!mendozagReferences:
<1399@tulum.swatsun.UUCP> <309@udccvax1.acs.udel.EDU>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!cmcl2!rutgers!iuvax!pur-ee!mendozag From: mendozag@pur-ee.UUCP (Grado) Newsgroups: comp.lang.prolog Subject: Re: self-replicating programs Message-ID: <7045@pur-ee.UUCP> Date: Mon, 23-Nov-87 01:46:31 EST Article-I.D.: pur-ee.7045 Posted: Mon Nov 23 01:46:31 1987 Date-Received: Wed, 25-Nov-87 20:10:36 EST References: <1399@tulum.swatsun.UUCP> <309@udccvax1.acs.udel.EDU> Reply-To: mendozag@pur-ee.UUCP (Victor M Grado) Organization: Purdue University Engineering Computer Network Lines: 28