1
0
Fork 0
mirror of https://github.com/NixOS/nix.dev.git synced 2024-10-18 14:32:43 -04:00

expand on single function argument

This commit is contained in:
Valentin Gagarin 2022-08-18 15:37:34 +02:00
parent fa674e3e11
commit 80b0dcb8ae

View file

@ -447,7 +447,9 @@ is equivalent to
Functions are everywhere in the Nix language and deserve particular attention.
Functions take exactly one argument.
### Single argument
Functions in Nix language can appear in different forms, but always take exactly one argument.
x: x + 1
@ -457,6 +459,9 @@ Wherever you see a colon (`:`) in Nix language code:
- on its left is the function argument
- on its right is the function body.
### Calling functions
Calling a function with an operand means writing the operand after the function.
Example