[m-dev.] For review: iteration support added to std_util.m

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Jan 13 01:01:23 AEDT 2001


On 12-Jan-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> > > +	iterate(Lo, >=(Hi), plus(1), Fn, X).
> > 
> > I was about to point out the bug in this code, until eventually
> > I realized that it was correct.
> > But the partially applied form of `>=' is confusing, IMHO.
> > I think it would be clearer to write
> > 
> > 	iterate(Lo, (pred(Xi::in) is semidet :- Xi =< Hi), plus(1), Fn, X).
> 
> Yes, we've had this discussion before.  I'm happy to make that change if
> you think the original confusing.

Well, it confused me.

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