diff options
Diffstat (limited to 'nix/nix-1p/README.md')
-rw-r--r-- | nix/nix-1p/README.md | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/nix/nix-1p/README.md b/nix/nix-1p/README.md index 0399bc41cd2d..c8f4b328fa18 100644 --- a/nix/nix-1p/README.md +++ b/nix/nix-1p/README.md @@ -348,7 +348,7 @@ in set.a or 23 Since the attribute `a` exists, this will return `42`. -``` +```nix # ... or fall back to a default if there is no such key let set = { }; in set.a or 23 @@ -357,6 +357,8 @@ in set.a or 23 Since the attribute `a` does not exist, this will fall back to returning the default value `23`. +Note that `or` expressions also work for nested attribute set access. + # Standard libraries Yes, libraries, plural. |