[m-dev.] Suggested small change to map.m

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Sep 13 01:32:50 AEDT 2000


On 12-Sep-2000, Ralph Becket <rbeck at microsoft.com> wrote:
> > From: Fergus Henderson [mailto:fjh at cs.mu.OZ.AU]
> > 
> > map__sorted_keys already exists.
> 
> The stupid thing is, I think I put it there...

Nope, according to the cvs logs it was Zoltan.

> I'll forget the whole change.

In that case I'll fix it.

----------

Estimated hours taken: 0.5

library/tree234.m:
	Document that tree234__keys and tree234__tree234_to_assoc_list
	return sorted lists.

Workspace: /home/pgrad/fjh/ws/hg
Index: library/tree234.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/tree234.m,v
retrieving revision 1.30
diff -u -d -r1.30 tree234.m
--- library/tree234.m	2000/07/24 00:52:34	1.30
+++ library/tree234.m	2000/09/12 14:29:04
@@ -73,6 +73,8 @@
 %	is semidet.
 :- mode tree234__remove_smallest(in, out, out, out) is semidet.
 
+	% Given a tree234, return a list of all the keys in the tree.
+	% The list that is returned is in sorted order.
 :- pred tree234__keys(tree234(K, V), list(K)).
 :- mode tree234__keys(in, out) is det.
 
@@ -91,6 +93,9 @@
 :- pred tree234__assoc_list_to_tree234(assoc_list(K, V), tree234(K, V)).
 :- mode tree234__assoc_list_to_tree234(in, out) is det.
 
+	% Given a tree234, return an association list of all the
+	% keys and values in the tree.  The association list that
+	% is returned is sorted on the keys.
 :- pred tree234__tree234_to_assoc_list(tree234(K, V), assoc_list(K, V)).
 :- mode tree234__tree234_to_assoc_list(in, out) is det.
 

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