[m-dev.] diff: add a functional version of map__init

David Overton dmo at cs.mu.OZ.AU
Fri Mar 31 10:55:41 AEST 2000



Estimated hours taken: 0.05

library/map.m:
	Add a functional version of map__init.


Index: map.m
===================================================================
RCS file: /home/mercury1/repository/mercury/library/map.m,v
retrieving revision 1.71
diff -u -r1.71 map.m
--- map.m	2000/03/28 03:41:09	1.71
+++ map.m	2000/03/31 00:51:01
@@ -608,6 +608,8 @@
 
 :- interface.
 
+:- func map__init = map(K, V).
+
 :- func map__lookup(map(K,V), K) = V.
 
 :- func map__det_insert(map(K,V), K, V) = map(K,V).
@@ -671,6 +673,9 @@
 % ---------------------------------------------------------------------------- %
 
 :- implementation.
+
+map__init = M :-
+	map__init(M).
 
 map__lookup(M, K) = V :-
 	map__lookup(M, K, V).

-- 
David Overton      Department of Computer Science & Software Engineering
PhD Student        The University of Melbourne, Victoria 3010, Australia
+61 3 8344 9159    http://www.cs.mu.oz.au/~dmo
--------------------------------------------------------------------------
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