pie___ has quit [Remote host closed the connection]
pie___ has joined #nix-lang
pie_ has joined #nix-lang
pie___ has quit [Ping timeout: 250 seconds]
jtojnar has quit [Read error: Connection reset by peer]
jtojnar_ has joined #nix-lang
jtojnar_ is now known as jtojnar
Synthetica has quit [Quit: Connection closed for inactivity]
<pie_>
ok this is kind of weird
<pie_>
> let f = pls: baseNameOf "asd/wat.dic"; baseNameOf = (f: f); in f 1
<{^_^}>
"asd/wat.dic"
<pie_>
but
<pie_>
> f = pls: baseNameOf "asd/wat.dic"
<{^_^}>
f defined
<pie_>
> let baseNameOf = (f: f); in f 1
<{^_^}>
"wat.dic"
<pie_>
why doesnt the first one work like the second one
<__monty__>
In the first one you redefine a name in a mutually recursive scope. In the third you happen to shadow baseNameOf from the outer scope but f's already closed over that and you shadow f in the body but that doesn't come into play.