mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-10 14:54:13 +00:00
Update index.md
This commit is contained in:
parent
e8edb773ba
commit
7212f9a358
1 changed files with 2 additions and 2 deletions
|
@ -242,7 +242,7 @@ args@{ a, b, ... }: a + b + args.c
|
|||
|
||||
# 但是要注意命名参数仅绑定了输入的 attribute set,默认参数不在其中,举例
|
||||
let
|
||||
f = { a ? 1, b ? 2, ... }@args: args
|
||||
f = { a ? 1, b ? 2, ... }@args: args;
|
||||
in
|
||||
f {} # 结果是 {},也就说明了 args 中包含默认值
|
||||
|
||||
|
@ -358,4 +358,4 @@ in
|
|||
|
||||
## 参考
|
||||
|
||||
- [Nix language basics - nix.dev](https://nix.dev/tutorials/first-steps/nix-language)
|
||||
- [Nix language basics - nix.dev](https://nix.dev/tutorials/first-steps/nix-language)
|
||||
|
|
Loading…
Reference in a new issue