mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-10 08:16:15 +02:00
Merge pull request #8263 from frederictobiasc/improve-doc-genericclosure
Documentation: Improve builtins.genericClosure
This commit is contained in:
commit
cf8effdae2
1 changed files with 8 additions and 6 deletions
|
@ -706,12 +706,14 @@ static RegisterPrimOp primop_genericClosure(RegisterPrimOp::Info {
|
||||||
.arity = 1,
|
.arity = 1,
|
||||||
.doc = R"(
|
.doc = R"(
|
||||||
Take an *attrset* with values named `startSet` and `operator` in order to
|
Take an *attrset* with values named `startSet` and `operator` in order to
|
||||||
return a *list of attrsets* by starting with the `startSet`, recursively
|
return a *list of attrsets* by starting with the `startSet` and recursively
|
||||||
applying the `operator` function to each element. The *attrsets* in the
|
applying the `operator` function to each `item`. The *attrsets* in the
|
||||||
`startSet` and produced by the `operator` must each contain value named
|
`startSet` and the *attrsets* produced by `operator` must contain a value
|
||||||
`key` which are comparable to each other. The result is produced by
|
named `key` which is comparable. The result is produced by calling `operator`
|
||||||
repeatedly calling the operator for each element encountered with a
|
for each `item` with a value for `key` that has not been called yet including
|
||||||
unique key, terminating when no new elements are produced. For example,
|
newly produced `item`s. The function terminates when no new `item`s are
|
||||||
|
produced. The resulting *list of attrsets* contains only *attrsets* with a
|
||||||
|
unique key. For example,
|
||||||
|
|
||||||
```
|
```
|
||||||
builtins.genericClosure {
|
builtins.genericClosure {
|
||||||
|
|
Loading…
Reference in a new issue