summaryrefslogtreecommitdiffhomepage
path: root/erlang.html.markdown
diff options
context:
space:
mode:
authorGeoff Liu <g@geoffliu.me>2015-06-16 12:55:06 -0600
committerGeoff Liu <g@geoffliu.me>2015-06-16 12:55:06 -0600
commita6af51e42f6eef190fe8bdc602a7c07f040d4f5e (patch)
treefb18c44e2692e397e7937c96c65079b40b7ee79b /erlang.html.markdown
parent7070304d60715405bb5f2432f4c84868a6418376 (diff)
parente31b9e90c9bddda007f7b9a30aab0263443e9212 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'erlang.html.markdown')
-rw-r--r--erlang.html.markdown7
1 files changed, 7 insertions, 0 deletions
diff --git a/erlang.html.markdown b/erlang.html.markdown
index a3b571d1..8b67a76a 100644
--- a/erlang.html.markdown
+++ b/erlang.html.markdown
@@ -164,6 +164,13 @@ is_cat(A) -> false.
is_dog(A) when is_atom(A), A =:= dog -> true;
is_dog(A) -> false.
+% We won't dwell on the `=:=` operator here; just be aware that it is used to
+% check whether two Erlang expressions have the same value *and* the same type.
+% Contrast this behaviour to that of the `==` operator:
+1 + 2 =:= 3. % true
+1 + 2 =:= 3.0. % false
+1 + 2 == 3.0. % true
+
% 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`.