[erlang-questions] Illegal Guard?
Theepan
vasdeveloper@REDACTED
Sat Feb 6 17:32:28 CET 2016
Hi Rad,
Thanks, that helps.
Regards,
Theepan
On Fri, Feb 5, 2016 at 6:21 PM, Rad Gruchalski <radek@REDACTED> wrote:
> It’s explained here:
> http://erlang.org/doc/reference_manual/expressions.html#id83710
> The set of valid *guard expressions* (sometimes called guard tests) is a
> subset of the set of valid Erlang expressions. The reason for restricting
> the set of valid expressions is that evaluation of a guard expression must
> be guaranteed to be free of side effects.
>
> Kind regards,
> Radek Gruchalski
> radek@REDACTED <radek@REDACTED>
> de.linkedin.com/in/radgruchalski/
>
>
> *Confidentiality:*This communication is intended for the above-named
> person and may be confidential and/or legally privileged.
> If it has come to you in error you must take no action based on it, nor
> must you copy or show it to anyone; please delete/destroy and inform the
> sender immediately.
>
> On Friday, 5 February 2016 at 13:40, Theepan wrote:
>
> Team - Any idea?
>
>
> 60>
>
> 60>
>
> 60> is_integer(A = 5).
>
> true
>
> 61>
>
> 61> fun () when is_integer(A = 5) -> ok end.
>
> * 2: illegal guard expression
>
> 62>
>
> 62>
>
> 62>
>
> 62> fun () when is_integer(5) -> ok end.
>
> #Fun<erl_eval.20.54118792>
>
> 63>
>
> 63>
>
> 63> fun (A = 5) when is_integer(A) -> ok end.
>
> #Fun<erl_eval.6.54118792>
>
> 64>
>
> 64>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20160206/1c3bdc34/attachment.htm>
More information about the erlang-questions
mailing list