for review: assoc_list__map_from_corresponding_lists

Tyson Dowd trd at cs.mu.OZ.AU
Fri Jan 23 14:38:42 AEDT 1998


On 22-Jan-1998, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> 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?

No.

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

I'm just as happy to do without the predicate, because it's actually
more work for me to use it than not. It was just suggested in Zoltan's
review of my code. When it's actually implemented, however, it doesn't
look as nice as the suggestion ;-)

-- 
       Tyson Dowd           # 
                            #  Surreal humour isn't eveyone's cup of
     trd at cs.mu.oz.au        #  fur.
http://www.cs.mu.oz.au/~trd #



More information about the developers mailing list