[nix/en] Add @ syntax to set pattern matching section (#4170)

This commit is contained in:
Nathaniel W Griswold 2023-12-14 09:13:20 -06:00 committed by GitHub
parent ad6b3df619
commit c2ba7b321f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -305,6 +305,9 @@ with builtins; [
({x, y, ...}: x + "-" + y) { x = "a"; y = "b"; z = "c"; }
#=> "a-b"
# The entire set can be bound to a variable using `@`
(args@{x, y}: args.x + "-" + args.y) { x = "a"; y = "b"; }
#=> "a-b"
# Errors
#=========================================