Re: Usage of findall.

From: Kish Shen <ks15_at_icparc.ic.ac.uk>
Date: Fri 23 May 2003 04:19:02 PM GMT
Message-Id: <E19JFG2-0000bu-00@holborn.icparc.ic.ac.uk>
Dear Josh,

>findall(?Term, +Goal, ?List)

The intention of Term is to act as a template to specify how the results of
executing Goal should be collected in List. This is why they should not
occur eleswhere in the clause.

>        findall(result(GX, GY, GZ), do_stuff(GX, GY, GZ), [result(X, Y,
>Z)]), 
>        do_something_else(X, Y, Z). 

Yes, I think this is how it should be written.

>Secondly, if we went ahead with the first pattern, what would happen?

I think you should consider that the behaviour is undefined in that case,
i.e. the behaviour might very well depend on the details of how findall
is implemented, and you should not assume any actual behaviour would not
change between implementations.

Cheers,

Kish
Received on Fri May 23 17:19:05 2003

This archive was generated by hypermail 2.1.8 : Wed 16 Nov 2005 06:08:22 PM GMT GMT