Skip to content

Commit

Permalink
lib.hasAttrByPath: fix typo (#302042)
Browse files Browse the repository at this point in the history
  • Loading branch information
dottharun authored Apr 6, 2024
1 parent 05eeb69 commit 5bcb08e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/attrsets.nix
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,9 @@ rec {
Nix has a [has attribute operator `?`](https://nixos.org/manual/nix/stable/language/operators#has-attribute), which is sufficient for such queries, as long as the number of attributes is static. For example:
```nix
(x?a.b) == hasAttryByPath ["a" "b"] x
(x?a.b) == hasAttrByPath ["a" "b"] x
# and
(x?${f p}."example.com") == hasAttryByPath [ (f p) "example.com" ] x
(x?${f p}."example.com") == hasAttrByPath [ (f p) "example.com" ] x
```
**Laws**:
Expand Down

0 comments on commit 5bcb08e

Please sign in to comment.