diff options
author | Andre Polykanine A.K.A. Menelion ElensĂșlĂ« <andre@oire.org> | 2017-10-10 02:14:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-10 02:14:19 +0300 |
commit | 72d86bb2313a89d580c5df76c48f9a8bef76bc6d (patch) | |
tree | 0e5df4da05d36ea763ed0055bb4e6b0c835125dc /nix.html.markdown | |
parent | 7415df00770a39509c23e08c79345c53eefe4b8a (diff) | |
parent | 667cbfe2ba105858f2dabb55f0772c6769a2323a (diff) |
Merge pull request #2902 from chris-martin/nix-question-mark
[nix/en] document using ? to test set membership
Diffstat (limited to 'nix.html.markdown')
-rw-r--r-- | nix.html.markdown | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/nix.html.markdown b/nix.html.markdown index ef59a135..ba122a46 100644 --- a/nix.html.markdown +++ b/nix.html.markdown @@ -208,6 +208,12 @@ with builtins; [ { a = 1; b = 2; }.a #=> 1 + # The ? operator tests whether a key is present in a set. + ({ a = 1; b = 2; } ? a) + #=> true + ({ a = 1; b = 2; } ? c) + #=> false + # The // operator merges two sets. ({ a = 1; } // { b = 2; }) #=> { a = 1; b = 2; } |