Skip to content

Commit 27fe05b

Browse files
Introduce concepts of list head/tail before use (#188)
The concepts of the head and tail of a list are used at line 100 without first being introduced. This change introduces the concepts earlier by making a minor addition at the introductory discussion of the constructor ::.
1 parent 90c5ea8 commit 27fe05b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/main/scala/scalatutorial/sections/StandardLibrary.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ object StandardLibrary extends ScalaTutorialSection {
6161
*
6262
* - the empty list `Nil`, and
6363
* - the construction operation `::` (pronounced ''cons''): `x :: xs` gives a new list
64-
* with the first element `x`, followed by the elements of `xs` (which is a list itself).
64+
* with the first element `x`, called the `head`, followed by the `tail` `xs`, which is itself a list of elements.
6565
*
6666
* For example:
6767
*

0 commit comments

Comments
 (0)