[m-dev.] for review: additions to bag.m (repost)
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Mar 10 13:53:38 AEDT 1998
On 10-Mar-1998, Andrew Bromage <bromage at cs.mu.OZ.AU> wrote:
> + % Remove a list of values from a bag. Duplicates are removed
> + % from the bag the appropriate number of times. Fail if any of
> + % the items in the bag does not exist in the bag.
> + %
> + % This call is logically equivalent to:
> + %
> + % bag__remove_list(Bag0, RemoveList, Bag) :-
> + % bag__from_list(RemoveList, RemoveBag),
> + % bag__is_subbag(RemoveBag, Bag0),
> + % bag__subtract(Bag0, RemoveBag, Bag).
> +:- pred bag__remove_list(bag(T), list(T), bag(T)).
> +:- mode bag__remove_list(in, in, out) is semidet.
I suggest you insert a line containing only a "%" between the
comment and the pred declaration.
% bag__remove_list(Bag0, RemoveList, Bag) :-
% bag__from_list(RemoveList, RemoveBag),
% bag__is_subbag(RemoveBag, Bag0),
% bag__subtract(Bag0, RemoveBag, Bag).
%
:- pred bag__remove_list(bag(T), list(T), bag(T)).
:- mode bag__remove_list(in, in, out) is semidet.
--
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.
More information about the developers
mailing list