[erlang-questions] Erlang elseif

Dave Smith dave.smith.to@REDACTED
Wed Nov 26 22:59:25 CET 2008


2008/11/26 Dave Smith <dave.smith.to@REDACTED>

>
>
> cond
>   {ok, X} =:= f(Y) -> g(X);
>   true -> h(X)
> end
>


Again, this is exactly why I would like to avoid another conditional
construct. People would do the above when the following would be
appropriate:

case f(Y) of
  {ok, X} -> g(X);
  _ -> h(X)         %% X unbound ???
end
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20081126/2e5f67f9/attachment.htm>


More information about the erlang-questions mailing list