Skip to content

Commit 276f872

Browse files
markdown improvements
1 parent 7346d15 commit 276f872

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lexicalscoping.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ crazy <- function() {
7979

8080
The first two `print()` statements use the variable `x` in the containing environment, as no local variable `x` exists at the moment, which has been updated from `x <- 0` to `x <- 3.14` via `x <<- 3.14` inside function `crazy()`.
8181

82-
The third `print()` statement uses the variable `x` just created by the preceding assignment statement x <- 42 which causes the containing environment not to be searched unlike the first and second `print()` statements.
82+
The third `print()` statement uses the variable `x` just created by the preceding assignment statement `x <- 42` which causes the containing environment not to be searched unlike the first and second `print()` statements.
8383

84-
The fourth `print()` statement uses the variable `x` which exists within the function because the x <- 42 now masks access, at least for anything other than the super-assignment operator, to the containing environment’s variable `x`.
84+
The fourth `print()` statement uses the variable `x` which exists within the function because the `x <- 42` now masks access, at least for anything other than the super-assignment operator, to the containing environment’s variable `x`.
8585

8686
I added a call to variable `x` after the function `crazy()` returns to show it keeps the new value assigned to it by the super-assignment operator inside function `crazy()`.
8787

0 commit comments

Comments
 (0)