[m-dev.] For review: minor additions to list.m and string.m
Ralph Becket
rbeck at microsoft.com
Fri Sep 8 19:33:05 AEDT 2000
> would be general enough to be useful often enough to bother with?
> (This is completely untested; I hope it's close enough to correct that
> you know what I mean.) Then if you want a geometric series you can
> always write something like series(1, >(1000), *(2)).
One problem here is that >(1000) = ( pred(X::in) is semidet :- 1000 > X )
which is probably not what is intended.
Should I add something like the following to int.m?
% lt(Y) returns the predicate P succeeding for X
% iff X < Y.
%
:- func lt(int) = pred(int).
:- mode lt(in) = out(pred(in) is semidet).
lt(Y) = ( pred(X::in) is semidet :- X < Y ).
(sim. for le, gt, ge).
I suggest implementing it that way to avoid confusion with
uncurried < etc.
Ralph
--------------------------------------------------------------------------
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