mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-08-17 11:10:57 +03:00
lib.foldl': document eta expansion
This commit is contained in:
parent
9beef9f1ba
commit
c8885b86b2
@ -228,7 +228,15 @@ rec {
|
||||
|
||||
`acc`
|
||||
|
||||
: The initial accumulator value
|
||||
: The initial accumulator value.
|
||||
|
||||
The accumulator value is evaluated in any case before the first iteration starts.
|
||||
|
||||
To avoid evaluation even before the `list` argument is given an eta expansion can be used:
|
||||
|
||||
```nix
|
||||
list: lib.foldl' op acc list
|
||||
```
|
||||
|
||||
`list`
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user