I have a question about how or/2 works in pilog. Here's my test of or/2:
~/lisp/miniPicoLisp
$ ./pil
: (be a (3))
- a
: (be b (3))
- b
: (? (a 3))
- T
: (be foo (@N) (or (a @N) (b @N)))
- foo
: (? foo a b or (foo 3))
1 (foo 3)
1 (or (a 3) (b 3))
- NIL
:
Shouldn't that be T ?
It seems to
More pilog adventures!
Alex, would it be possible to give pilog an and/2 rule similar to the or/2 rule
that pilog has now? Sometimes refactoring pilog around the lack of an and/2 is
a pain. Here's an example, where a rule has a kind of a logical expression
(with prolog backup):
What is select ( http://software-lab.de/doc/refS.html#select/3 ) using
internally for the filter part?
Seems to me the filter part is a kind of implicit and.
On Thu, Jun 30, 2011 at 9:32 AM, Doug Snead semaphore_2...@yahoo.com wrote:
More pilog adventures!
Alex, would it be possible to give
Hi Doug,
Hmmm... the clauses seem paired in like so, in the or/2 reference, like
(or
((equal 3 @X) (equal @X 4))
((equal 7 @X) (equal @X 7)) )
When I similarly pair the clauses of or/2:
(be foo (@N) (or ((a @N) (b @N
Right. This is how Pilog (Prolog) works. ;-)
Hi Henrik,
What is select ( http://software-lab.de/doc/refS.html#select/3 ) using
internally for the filter part?
Seems to me the filter part is a kind of implicit and.
Right.
As I wrote in the previous mails, all clauses in a Prolog rule (not only
in 'select/3') are combined by an implict
Hi Doug,
Alex, would it be possible to give pilog an and/2 rule similar to the
or/2 rule that pilog has now? Sometimes refactoring pilog around the
lack of an and/2 is a pain. Here's an example, where a rule has a kind
of a logical expression (with prolog backup):
As I wrote in my last mail,
Ha! The and is implicit ... I should seen that - the or/2 example there was a
clue.
Thanks for the assistance!! I feel close to getting golog (and elevator
example) working.
Cheers,
Doug
--- On Wed, 6/29/11, Alexander Burger a...@software-lab.de wrote:
From: Alexander Burger