[erlang-questions] Order of evaluation of guards

Ulf Wiger ulf@REDACTED
Tue Jan 6 14:00:54 CET 2015

> On 06 Jan 2015, at 11:33, Imants Cekusins <imantc@REDACTED> wrote:
> Are guards - the right place for complicated logic?
> Why not move such logic inside a function and use "if”?

In that particular example, it’s an API function, and the point of putting the checks in a guard sequence is that the function should fail if called with invalid arguments.

Ulf W

Ulf Wiger, Co-founder & Developer Advocate, Feuerlabs Inc.

More information about the erlang-questions mailing list