aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRobert Hensing <roberth@users.noreply.github.com>2023-05-08 12:23:19 +0200
committerGitHub <noreply@github.com>2023-05-08 12:23:19 +0200
commitcf8effdae25bac889533cff86d637512f4f74bf8 (patch)
tree1e8f375a7baf5999392b77dc0c1dd3e87828cae8 /src
parent879e45247c0e94f7a07dcafdb42c23d988cd9962 (diff)
parentf0d2b7eef3f85008163ae356fca92e67c8a90f56 (diff)
Merge pull request #8263 from frederictobiasc/improve-doc-genericclosure
Documentation: Improve builtins.genericClosure
Diffstat (limited to 'src')
-rw-r--r--src/libexpr/primops.cc14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/libexpr/primops.cc b/src/libexpr/primops.cc
index cea5b4202..22ac780a5 100644
--- a/src/libexpr/primops.cc
+++ b/src/libexpr/primops.cc
@@ -706,12 +706,14 @@ static RegisterPrimOp primop_genericClosure(RegisterPrimOp::Info {
.arity = 1,
.doc = R"(
Take an *attrset* with values named `startSet` and `operator` in order to
- return a *list of attrsets* by starting with the `startSet`, recursively
- applying the `operator` function to each element. The *attrsets* in the
- `startSet` and produced by the `operator` must each contain value named
- `key` which are comparable to each other. The result is produced by
- repeatedly calling the operator for each element encountered with a
- unique key, terminating when no new elements are produced. For example,
+ return a *list of attrsets* by starting with the `startSet` and recursively
+ applying the `operator` function to each `item`. The *attrsets* in the
+ `startSet` and the *attrsets* produced by `operator` must contain a value
+ named `key` which is comparable. The result is produced by calling `operator`
+ for each `item` with a value for `key` that has not been called yet including
+ 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 {