mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2025-05-05 14:28:31 +00:00
Merge pull request #2031 from byaruhaf/patch-1
[erlang/en] Replaced 'or' with a semicolons
This commit is contained in:
commit
8fd639eeba
@ -177,7 +177,7 @@ is_dog(A) -> false.
|
||||
% A guard sequence is either a single guard or a series of guards, separated
|
||||
% by semicolons (`;`). The guard sequence `G1; G2; ...; Gn` is true if at
|
||||
% least one of the guards `G1`, `G2`, ..., `Gn` evaluates to `true`.
|
||||
is_pet(A) when is_atom(A), (A =:= dog) or (A =:= cat) -> true;
|
||||
is_pet(A) when is_atom(A), (A =:= dog);(A =:= cat) -> true;
|
||||
is_pet(A) -> false.
|
||||
|
||||
% Warning: not all valid Erlang expressions can be used as guard expressions;
|
||||
|
Loading…
Reference in New Issue
Block a user