🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.prolog
Article #166

Re: How to get the n'th element of a list

#166
From: P. Singleton
Date: Thu, 09 Apr 1992 11:52
20 lines
1521 bytes
From article <rsqauINNbn6@agate.berkeley.edu>, by stolcke@ICSI.Berkeley.EDU (Andreas Stolcke):

> BTW, technically, your constraint "with only one predicate" is of course
> vacuous since your can simulate as many predicates as you want in only
> one predicate.

Presumably, any program could be rewritten as a single predicate, and it
is partly a matter of style how one factors out bits of such a program
into distinct procedures.  Are there any meta-programs out there which
rewrite programs to improve (optimise?) their predicatisation?  Do the
demands of efficiency, readability and reuseability conflict?  Should I
read "The Craft of Prolog"?  Wouldn't a structure-editor for Prolog e.g.
allow me to highlight some goals in the body of a procedure and, with
one mouse-click, extract them into a separate procedure, automatically
deciding what arguments are necessary?
----
  __   __    Paul Singleton (Mr)           JANET: paul@uk.ac.keele.cs
 |__) (__    Computer Science Dept.        other: paul@cs.keele.ac.uk
 |  .  __).  Keele University, Newcastle,    tel: +44 (0)782 621111 x7355
             Staffs ST5 5BG, ENGLAND         fax: +44 (0)782 713082
Technical Details
Message-ID: <2508@keele.keele.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!keele!csa09
References: <rsqauINNbn6@agate.berkeley.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!uknet!keele!csa09
From: csa09@seq1.keele.ac.uk (P. Singleton)
Newsgroups: comp.lang.prolog
Subject: Re: How to get the n'th element of a list
Message-ID: <2508@keele.keele.ac.uk>
Date: 9 Apr 92 11:52:07 GMT
References: <rsqauINNbn6@agate.berkeley.edu>
Organization: University of Keele, England
Lines: 20