[m-dev.] Nice! re: bintree deconstruction

doug.auclair at logicaltypes.com doug.auclair at logicaltypes.com
Thu Feb 16 15:13:56 AEDT 2006


Dear Ralph, you wrote:

>Maybe a better solution would be to just introduce a deconstruction
>predicate to bintree:
>
>:- interface.
>
>        % Fails on empty bintrees.
>        %
>:- pred deconstruct(bintree(K, V)::in, K::out, V::out,
>        bintree(K, V)::out, bintree(K, V)::out) is semidet.

I like it!  It doesn't introduce the auxilary representation type and also allows for the iteration that I need.  Given Julien's remark, however, would this find its way into bintree(_set), or are we now simply refining a moot discussion?  If the former, please roll in the change you recommend.

Sincerely,
Doug Auclair

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