From 08016e046ec23878533fc0f8287a92bb62a9d38c Mon Sep 17 00:00:00 2001 From: Tim Saunders Date: Sun, 30 Jun 2019 19:46:14 +0100 Subject: [PATCH] Added explanation of shadowing, grammar fix --- src/main/scala/scalatutorial/sections/LexicalScopes.scala | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/scala/scalatutorial/sections/LexicalScopes.scala b/src/main/scala/scalatutorial/sections/LexicalScopes.scala index 37583c55..76b68176 100644 --- a/src/main/scala/scalatutorial/sections/LexicalScopes.scala +++ b/src/main/scala/scalatutorial/sections/LexicalScopes.scala @@ -80,9 +80,10 @@ object LexicalScopes extends ScalaTutorialSection { * = Lexical Scoping = * * Definitions of outer blocks are visible inside a block unless they are shadowed. + * Shadowed defintions are ones which are redfined in a lower scope. * * Therefore, we can simplify `sqrt` by eliminating redundant occurrences of the `x` parameter, which means - * everywhere the same thing: + * the same thing everywhere: * * = The `sqrt` Function, Take 3 = *