mirror of
https://github.com/adambard/learnxinyminutes-docs.git
synced 2024-12-23 17:41:41 +00:00
[nix/en] Add @
syntax to set pattern matching section (#4170)
This commit is contained in:
parent
ad6b3df619
commit
c2ba7b321f
@ -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
|
||||
#=========================================
|
||||
|
Loading…
Reference in New Issue
Block a user