erlang/otp — pull request #464 by nox (2014-09-01 13:43:26+00:00)
Title: Implement cond expressions

This makes the 'cond' keyword useful and introduces an expression similar to if expressions, without guard semantics.

```erlang
cond E1 -> B1;
...;
Ek -> Bk
end.
```

This code is more or less equivalent to k nested cases, with the difference that bindings from tests Ei do not spill in the subsequent Ei+1 and Bi+1 trees.

```erlang
case E1 of
true ->
B1;
false ->
case ... of
true ->
...;
false ->
case Ek of
true ->
Bk;
false ->
error(cond_clause);
Other ->
error({badbool,Other})
end;
Other ->
error({badbool,Other})
end;
Other ->
error({badbool,Other})
end.
```

The current implementation may be lacking with regard to warnings, please follow up on any shortcoming.