[nix/en] document using ? to test set membership

This commit is contained in:
Chris Martin 2017-10-09 18:51:02 -04:00
parent 7415df0077
commit 667cbfe2ba

View File

@ -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; }