forked from lix-project/lix
1b962fc720
f = args @ {x, y, z}: ...; `args' refers to the argument as a whole, which is further pattern-matched against the attribute set pattern {x, y, z}.
18 lines
150 B
Nix
18 lines
150 B
Nix
rec {
|
|
|
|
x = 123;
|
|
|
|
a = "foo";
|
|
|
|
b = "bar";
|
|
|
|
c = "foo" + "bar";
|
|
|
|
f = {z, x, y}: if y then x else z;
|
|
|
|
id = x: x;
|
|
|
|
at = args@{x, y, z}: x;
|
|
|
|
}
|