[m-dev.] Tuples and pairs

Peter Schachte schachte at cs.mu.OZ.AU
Thu Dec 20 15:36:27 AEDT 2001


On Thu, Dec 20, 2001 at 03:30:42PM +1100, Ralph Becket wrote:
> A while back we discussed whether we should redefine the type pair/2 as
> a synonym for {}/2.  I recall there was some dissent on the matter.
> 
> Could we have a quick show of hands for those in favour?

Abstain.

> If the vote is `nay', I'm thinking of adding lhs/1 and rhs/2 to
> std_util.m:
> 
> :- func lhs({L, _R}) = L.
> lhs({L, _R}) = L.
> 
> :- func rhs({_L, R}) = R.

How about field access functions instead.  Maybe define
first/1, second/1, 'first :='/1 and 'second :='/1?

-- 
Peter Schachte              I have not yet begun to procrastinate. 
schachte at cs.mu.OZ.AU        
www.cs.mu.oz.au/~schachte/  
Phone: +61 3 8344 9166      
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list