[erlang-questions] clarify: how to express this elegantly

Matej Kosik kosik@REDACTED
Wed Dec 5 12:01:12 CET 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Andras Georgy Bekes wrote:

> This can be written as (legal Erlang code):
> 
> if
>    Value== "state" ; Value=="rx_bit_rate" ; Value=="tx_bit_rate" ; Value=="ebno" ->
>       this;
>    Value=="packet_loss" ; Value=="round_trip_time" ->
>       that;
> end

Great. Thank you everyone.

> The interesting case is when the patterns do contain unbound variables.

- --
Matej Kosik
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHVoT4L+CaXfJI/hgRAsdRAKCSYv/66ZbaZqiTFc9tyT8Fl3WJUwCgjL3z
YlTlke9OM1uGguyAPAEQ6Vk=
=0k7T
-----END PGP SIGNATURE-----



More information about the erlang-questions mailing list