hi everyone,
thank for the reponses.
Chris, is_boolean/1 and boolean/1 are two completely different
expressions.
what boolean does it to convert any expression to either
`true` or `false`, while is_boolean is return true if the expression is
`true` or `false`.
maybe my explanation that it can be used in guards made it confusion.
what i meant is that so far,
with the current functions that do not return a boolean, it is not easy
to use them in guards with the boolean operators `and`, `or`, `not`.
Aaron and Sikes:
those shortcircuit operators cannot be used in guards, only the boolean
versions mentioned above.
but as Maxim commented, this function can be solved by doing `not not`
which is not very readable in a guard and can also be misleading.
thanks for the input
On Sun, 25 Oct 2015 13:53:50 -0400
Maxim Chernyak <
madfa...@gmail.com> wrote:
> If I understand correctly, this particular case can be solved by !!
> (double bang) fwiw.
>
> > On Oct 25, 2015, at 1:41 PM, Aaron Sikes <
jinga...@gmail.com>
> > wrote:
> >
> > I think this role is already served by &&, ||, and !, no?
> >
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "elixir-lang-core" group. To unsubscribe from this group and
> > stop receiving emails from it, send an email to
> >
elixir-lang-co...@googlegroups.com
> > <mailto:
elixir-lang-co...@googlegroups.com>. To view
> > <
https://groups.google.com/d/msgid/elixir-lang-core/1445794862819.0ec18702%40Nodemailer?utm_medium=email&utm_source=footer>.
> > <
https://groups.google.com/d/optout>.
>