From 1f58858999f4878d452013a3a2ea0f1074c29231 Mon Sep 17 00:00:00 2001 From: JacobArchambault <39110529+JacobArchambault@users.noreply.github.com> Date: Wed, 25 Nov 2020 00:40:59 -0500 Subject: [PATCH] Introduce concepts of list head/tail before use 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 ::. --- src/main/scala/scalatutorial/sections/StandardLibrary.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/scalatutorial/sections/StandardLibrary.scala b/src/main/scala/scalatutorial/sections/StandardLibrary.scala index dcf57e51..9b776c99 100644 --- a/src/main/scala/scalatutorial/sections/StandardLibrary.scala +++ b/src/main/scala/scalatutorial/sections/StandardLibrary.scala @@ -61,7 +61,7 @@ object StandardLibrary extends ScalaTutorialSection { * * - the empty list `Nil`, and * - the construction operation `::` (pronounced ''cons''): `x :: xs` gives a new list - * with the first element `x`, followed by the elements of `xs` (which is a list itself). + * with the first element `x`, called the `head`, followed by the `tail` `xs`, which is itself a list of elements. * * For example: *