Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!uxc!uxc.cso.uiuc.edu!clio!gerdeman From: gerdeman@clio.las.uiuc.edu Newsgroups: comp.lang.prolog Subject: Re: existential quantification in bagof Message-ID: <16400004@clio> Date: 8 Feb 89 18:36:00 GMT Lines: 30 Nf-ID: #R:<8902072057.AA21884@deimos.ads.c:-35:clio:16400004:000:854 Nf-From: clio.las.uiuc.edu!gerdeman Feb 8 12:36:00 1989 /* Written 2:57 pm Feb 7, 1989 by rar@DEIMOS.ADS.COM in clio:comp.lang.prolog */ /* ---------- "existential quantification in bagof" ---------- */ => E.g., given the DB => => foo(1,2,3,4). => foo(2,3,4,5). => foo(3,4,5,6). => foo(4,5,6,7). => => I can do => => | ?- T = p(X,Y,Z), setof(First, T^foo(First,X,Y,Z), Set). => => T = p(X,Y,Z), => X = _79, => Y = _94, => Z = _109, => First = _132, => Set = [1,2,3,4] => => I'd be curious to find out if other Prologs work like this. This is how it works in TI-Prolog. But how about 'findall'? I think this is the peculiar case. See my response to the original existential quantification question. -- Dale Gerdemann U of Ill Dept of Linguistics