1
0
Fork 0
mirror of https://github.com/NixOS/nix-pills synced 2024-09-19 04:00:13 -04:00
nix-pills/pills/04/let-scope.txt
Niels Egberts a96a0a35cc b is already defined if the user follows along in the repl
If a user follows along in the repl, the error won't occur as in section 4.6 the number 4 is assigned to `b`. To make this slightly less confusing and have the error appear as the user is following along we have to use a new variable.
2021-07-01 23:09:26 +01:00

3 lines
89 B
Plaintext

nix-repl> let a = (let c = 3; in c); in c
error: undefined variable `c' at (string):1:31