Skip to content

Commit 447d044

Browse files
Merge pull request #64 from sauntimo/patch-2
Added explanation of shadowing, grammar fix
2 parents fdee757 + 08016e0 commit 447d044

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/scala/scalatutorial/sections/LexicalScopes.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,10 @@ object LexicalScopes extends ScalaTutorialSection {
8080
* = Lexical Scoping =
8181
*
8282
* Definitions of outer blocks are visible inside a block unless they are shadowed.
83+
* Shadowed defintions are ones which are redfined in a lower scope.
8384
*
8485
* Therefore, we can simplify `sqrt` by eliminating redundant occurrences of the `x` parameter, which means
85-
* everywhere the same thing:
86+
* the same thing everywhere:
8687
*
8788
* = The `sqrt` Function, Take 3 =
8889
*

0 commit comments

Comments
 (0)