Grokbase Groups Perl ai July 2002

At 21:35 16/07/2002, Ovid wrote:
This is a follow up to my previous email

Since I'm trying to create "Perlog", a Prolog-like implementation in Perl,
I've run across an
issue which could cause some problems. Specifically, are variadic
(varying number of arguments)
predicates allowed in Prolog? In other words, can someone do this:

foo( bar, baz ).
foo( bar, quux, camel ).
Yes. they're essential. Your two predicates would
be foo/2 and foo/3.
If variadic predicates are allowed, what would they be used for? If I can
safely exclude them
from the Perl implementation, this would make life much easier.
You certainly cannot exclude them from any implimentation
of PROLOG and call it PROLOG - for examples of use, see any
number of textbooks. One thought is a routine that calls
itself with an argument: if there is no argument, it's the
first call. Agh, not clear, sorry, but I've had a very
busy weekend, and am still a tad drunk (just married).

Good luck -- have you seen the existing Prolog in Perl?


Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 7 | next ›
Discussion Overview
groupai @
postedJul 16, '02 at 4:34p
activeAug 19, '02 at 5:37p



site design / logo © 2021 Grokbase