[mercury-users] Starting to understand some/all
Douglas Auclair
dauclair at msn.com
Sun Mar 2 08:26:24 AEDT 2003
Dear all,
Now I finally understand why Mercury doesn't have the list predicates of
any/2 and every/2! I ran across a compilation error, however, and I need
some help. The compiler complained that for:
some [X] (member(X, List) => p(X))
X was free and should have been bound under the negation. I don't
understand the error (what negation?). My intention is to see of any
element of List passes p (which I think I'm doing by binding X for each of
the elements of List and passing that value to p). When I changed the term
to:
not (all [x] (member(X, List) => not p(X)))
it compiled and ran fine.
Am I using some incorrectly? I don't wish to use a negated predicate under
a negated universal quantification test, what are the ways I can use to
avoid this double negation?
Sincerely,
Doug Auclair
Note: p's signature is pred p(X::in) is semidet.
_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
--------------------------------------------------------------------------
mercury-users mailing list
post: mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the users
mailing list