[erlang-questions] Idiomatically handling multiple validation checks

zxq9 <>
Tue Dec 6 08:00:08 CET 2016


On 2016年12月6日 火曜日 15:57:03 zxq9 wrote:

> validate_request(valid, valid, valid) ->
> 	do_whatever();
> validate_request(_, _, _) ->
> 	{error, invalid!}.

I have to appologize for the last line here (and any other typos).
The naked "!" is not something you would be able to include in an atom
name (quoting aside). That was just a typo.

-Craig


More information about the erlang-questions mailing list