[mercury-users] equality functions

Michael Day mcda at students.cs.mu.oz.au
Mon Mar 20 18:14:37 AEDT 2000


> Not sure if it's useful.  What sort of use did you have in mind?

Say you had an array of integers, and wanted to create another array of
booleans stating whether the corresponding integer was greater than 5,
currying '<' and using it as a function would be one solution?

> Their use should be unambiguous in most cases, although using '='/2 as
> a function could get confusing for human readers.

Does X = Y = Z already have a meaning in Mercury?

> Note that you need parenthesis around `pred' in the mode declaration
> because `pred' is an operator.

Ah! I instinctively rejected them as unnecessary.

	<pauses to recompile instincts>

Thanks!

Michael
--------------------------------------------------------------------------
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