mirror of
https://github.com/NixOS/nix
synced 2025-07-07 06:01:48 +02:00
* Refactoring: combine functions that take an attribute set and
functions that take a single argument (plain lambdas) into one AST node (Function) that contains a Pattern node describing the arguments. Current patterns are single lazy arguments (VarPat) and matching against an attribute set (AttrsPat). This refactoring allows other kinds of patterns to be added easily, such as Haskell-style @-patterns, or list pattern matching.
This commit is contained in:
parent
c03b729319
commit
efe4b690ae
12 changed files with 184 additions and 148 deletions
|
@ -10,4 +10,6 @@ rec {
|
|||
|
||||
f = {z, x, y}: if y then x else z;
|
||||
|
||||
}
|
||||
id = x: x;
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue