diff options
author | Chris Martin <ch.martin@gmail.com> | 2017-10-09 18:51:02 -0400 |
---|---|---|
committer | Chris Martin <ch.martin@gmail.com> | 2017-10-09 18:51:02 -0400 |
commit | 667cbfe2ba105858f2dabb55f0772c6769a2323a (patch) | |
tree | 0e5df4da05d36ea763ed0055bb4e6b0c835125dc /nix.html.markdown | |
parent | 7415df00770a39509c23e08c79345c53eefe4b8a (diff) |
[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; } |