how to hold lists

Joel Reymont joelr1@REDACTED
Fri May 12 14:29:35 CEST 2006


Start a gen_server, let it grab your list of atoms and assign each  
atom a number based on its list position. Service calls to convert  
atom to number.

Alternatively, convert the list once and memoize it in a function.  
Repeated calls to the resulting function will return atom to number  
translations.

On May 12, 2006, at 12:50 PM, Yani Dzhurov wrote:

> and I need to manage an enum with about 100 values ... and if I  
> need to
> change these funs every  time a new value is added /a value may be  
> added at
> any position, not just the first one.../ .. it would become a hell:)
> So I need a better way to manage these enums.

--
http://wagerlabs.com/








More information about the erlang-questions mailing list