[erlang-questions] Orelse and andalso as short-hand for case
empro2@REDACTED
empro2@REDACTED
Tue Jul 24 21:06:31 CEST 2018
Am Tue, 24 Jul 2018 17:30:46 +0300
schrieb Led <ledest@REDACTED>:
> 2018-07-24 13:26 GMT+03:00 <empro2@REDACTED>:
>
> > Why not:
> >
> > if Pid =:= WorkerPid -> throw({'task', Task}) end,
> >
> > ?
> Are you serious?
> Or is this a joke?
Sorry! do not attribute to jest what can be explained with
simple stupidity - or so the saying goes ... :-)
Perhaps it was the mentioning of WHEN and UNLESS (that
remove the need for PROGN and the "else" in LISP), perhaps
it was seeing the use of a list comprehension without a list
producing one that was not wanted, perhaps I was
simply trying not to like the "andalso" (which is only
possible since R13A
http://erlang.org/doc/reference_manual/expressions.html#short-circuit-expressions)
or perhaps there is a reason for my "if" being nonsense and
that reason is not to be circumvented with "andalso" ...
... but I seem to be too stupid to see that (yet) :-)
Michael
--
If a bank in need of money is systematically important,
then that system is not important.
More information about the erlang-questions
mailing list