for review: assoc_list__map_from_corresponding_lists

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Jan 22 18:48:50 AEDT 1998


On 22-Jan-1998, Tyson Dowd <trd at cs.mu.OZ.AU> wrote:
> 
> Here's a quick change to the library that was suggested to
> help with my layouts change.
> 
> library/assoc_list.m:
> 	Add a new predicate:
> 		assoc_list__map_from_corresponding_lists
> 	which applies a predicate to the corresponing list
> 	elements before packaging them into an assoc list.

s/corresponing/corresponding/

Does this do anything that you can't get using
assoc_list_from_corresponding_list, list__map,
and deforestation?

I think that when writing code in the compiler, we should write
base decisions about efficiency on the optimizations that the
current compiler can perform; but when designing the library,
it might be better to also take into account optimizations that
we hope it will be able to perform soon.

If we add this predicate, does that mean that for every
other predicate in the library which produces a list
we should also add a `map_' version of it?

-- 
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