lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Fri, 30 Mar 2012 15:03:40 +0200
steve donovan <steve.j.donovan@gmail.com> wrote:

> On Fri, Mar 30, 2012 at 2:59 PM, Ousmane Roland Yonaba
> <roland.yonaba@gmail.com> wrote:
> > explaining...You're taking about the speed issue that will certainly
> > occur.. Would you mind giving me an example of the reverse lookup
> > you were talking about ?
> 
> We have a table
> 
> T = {dog = 1, cat = 4, lizard = 6}
> 
> and the reverse lookup is just:
> 
> R = {[1] = 'dog', [4] = 'cat', [6] = 'lizard'}
> 
> Some people call this the 'invert' operation:

I've always called it an index :-)

SteveT