You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
letx=y;y={v=x;};inx# or y# { v = { v = «repeated»; }; }
Or a bit more complicated example,
letx={v=x;w=y;};y={p=x;q=y;};inx# { v = { v = «repeated»; w = { p = «repeated»; q = «repeated»; }; }; w = «repeated»; }
It does however, fails when its not referenced yet it refers to some undefined value:
letx={v=y;};in7# error: undefined variable 'y'
Note: All ran in nix repl with/without :p in front.
Follow up questions after this,
How infinite recursion is detected by nix?
Evaluation order, does it matter, is there a catch in let ... in ...?
Any (interesting) high-level details about the evaluation order that makes nix do this.
This maybe goes a bit into nix internals, so I'm not sure if its a good fit for a Nix Hour talk, but its really interesting to see how lazy language evolve into this while still being written in a procedural language.
Thanks!
The text was updated successfully, but these errors were encountered:
Follow up from Nix Hour #19 at 7m51s
How does this work?
Or a bit more complicated example,
It does however, fails when its not referenced yet it refers to some undefined value:
Note: All ran in
nix repl
with/without:p
in front.Follow up questions after this,
let ... in ...
?This maybe goes a bit into nix internals, so I'm not sure if its a good fit for a Nix Hour talk, but its really interesting to see how lazy language evolve into this while still being written in a procedural language.
Thanks!
The text was updated successfully, but these errors were encountered: