lix/tests/lang/eval-okay-xml.nix
Eelco Dolstra 1b962fc720 * @-patterns as in Haskell. For instance, in a function definition
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}.
2008-08-14 12:53:29 +00:00

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;
}