[mercury-users] constructor class syntax
Michael Day
mikeday at corplink.com.au
Wed Nov 3 17:42:16 AEDT 1999
> :- typeclass ordered_container(C, T) <= container(C), ordered(T) where
> [
> func lowest_element(C(T)) = T <= ordered(T),
> func highest_element(C(T)) = T <= ordered(T),
> ...
> and so forth
> ].
Ahh now that seems much more obvious. Would all the methods still need the
constraint that T be ordered though?
Thanks for the reference!
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