[m-dev.] for review: list__map[23]
Peter Schachte
schachte at cs.mu.OZ.AU
Mon Jan 8 16:32:06 AEDT 2001
> library/list.m:
> Add two predicates that perform what list__map does, but for higher
> order arguments that return two or three outputs instead of one.
...
> + % list__map2(T, L, M1, M2) uses the closure T
> + % to transform the elements of L into the elements of M1 and M2.
...
> + % list__map3(T, L, M1, M2, M3) uses the closure T
> + % to transform the elements of L into the elements of M1, M2 and M3.
Since these predicates apply a closure to 3 and 4 arguments, respectively, I
think calling them list__map3 and list__map4 would be more intuitive. Also,
your documentation is rather imparative-sounding; how about saying that the
predicates specify that the closure applied to corresponding elements of the
other arguments, which are lists of the same length, holds?
--
Peter Schachte <schachte at cs.mu.OZ.AU> The most unpardonable sin in society
http://www.cs.mu.oz.au/~schachte/ is independence of thought.
Phone: +61 3 8344 9166 -- Emma Goldman
Fax: +61 3 9348 1184
--------------------------------------------------------------------------
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