Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!know!news.cs.indiana.edu!ariel.unm.edu!nmsu!opus!ted From: ted@nmsu.edu (Ted Dunning) Newsgroups: comp.lang.prolog Subject: co-routining Message-ID: Date: 6 Dec 90 21:55:17 GMT Sender: news@NMSU.Edu Distribution: comp Organization: Computing Research Lab Lines: 24 i have two questions about prologs which contain a freeze/2 predicate such as sicstus prolog. 1) how can one delay a goal until _either_ of two variables are instantiated? something like this could be done by the following, freeze(X,Y,G) :- freeze(X,G), freeze(Y,G). but this has the nasty consequence that G is called twice. note that freeze(X,freeze(Y,G)) does _not_ work since Y may instantiated before X, and i want G to be called in that case, too. 2) how can freeze/2 be used to do co-routining? does this require a modification of what is normally taken to be co-routining? Brought to you by Super Global Mega Corp .com