[erlang-questions] How would you do 100 ifs?

Max Bourinov bourinov@REDACTED
Tue Nov 15 14:43:07 CET 2011


I see what you mean. For me it seems a little bit too heavy weapon for my
little task. But thank you Max - it is good to know some cool techniques!

After some consideration for me it seems it makes sense to create a process
(gen_server) that will hold the range-list inside its state and call it
every time I need to find out my current index.


On Tue, Nov 15, 2011 at 4:34 PM, Max Lapshin <max.lapshin@REDACTED> wrote:

> On Tue, Nov 15, 2011 at 4:31 PM, Max Bourinov <bourinov@REDACTED> wrote:
> >>>Compile dynamic module
> > Max, can you point me to docs where I can read more about this?
>
>
> https://github.com/erlyvideo/http_router/blob/master/src/http_router_compiler.erl
>
> https://github.com/ahmednawras/log4erl/blob/master/src/log_filter_codegen.erl
>
> or something else like this
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111115/ce9b4eee/attachment.htm>


More information about the erlang-questions mailing list