aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2018-08-08 18:39:52 +0200
committerGitHub <[email protected]>2018-08-08 18:39:52 +0200
commitc5c0e67aeb5163b23d98cc2d7a4c9b2b10f1e241 (patch)
treee5f8260aee4862040d29b1feed25593611ac5d65
parent783172ca6d0453e115e038edbb46f892c0d35241 (diff)
parent629ad2e0971efcf58934c76ea1306b0ff0629339 (diff)
downloadotp-c5c0e67aeb5163b23d98cc2d7a4c9b2b10f1e241.tar.gz
otp-c5c0e67aeb5163b23d98cc2d7a4c9b2b10f1e241.tar.bz2
otp-c5c0e67aeb5163b23d98cc2d7a4c9b2b10f1e241.zip
Merge pull request #1913 from elbrujohalcon/patch-2
Add clarification on nil type OTP-15222
-rw-r--r--system/doc/reference_manual/expressions.xml4
1 files changed, 4 insertions, 0 deletions
diff --git a/system/doc/reference_manual/expressions.xml b/system/doc/reference_manual/expressions.xml
index 94e40dd077..684a1191d0 100644
--- a/system/doc/reference_manual/expressions.xml
+++ b/system/doc/reference_manual/expressions.xml
@@ -567,6 +567,10 @@ Expr1 <input>op</input> Expr2</pre>
order is defined:</p>
<pre>
number &lt; atom &lt; reference &lt; fun &lt; port &lt; pid &lt; tuple &lt; map &lt; nil &lt; list &lt; bit string</pre>
+ <p><c>nil</c> in the previous expression represents the empty list
+ (i.e. <c>[]</c>), which is regarded as a separate type from
+ <c>list/0</c>. That's why <c>nil &lt; list</c>.
+ </p>
<p>Lists are compared element by element. Tuples are ordered by
size, two tuples with the same size are compared element by
element.</p>