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

Max Bourinov bourinov@REDACTED
Tue Nov 15 14:27:22 CET 2011


Hi guys,

I have a value X which is integer, and I have a list of ranges
[0....200),[200....600),[600...1000)....etc....[100000, infinity] (this is
just an example). We can assume that the list is static.

I have frequently check the index of the range X belongs to.

How would you implement it in Erlang?

Best regards,
Max
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111115/fcc06bb3/attachment.htm>


More information about the erlang-questions mailing list