[mercury-users] returning a term from a function? how to?

Fergus Henderson fjh at cs.mu.OZ.AU
Thu May 3 14:34:56 AEST 2001


On 02-May-2001, Terrence Brannon <princepawn at earthlink.net> wrote:
> question 2 - something tells me my type declaration below is
> useless... hmm. Actually, no, I take that back, because I typed add/3
> as rational,rational,rational, it is using my type definition to
> expand and type that.

The type declaration is also needed because it introduces the constructor
rational/2 which you use in the clause for main.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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