-
Notifications
You must be signed in to change notification settings - Fork 771
Open
Labels
P-lowWe are not planning to work on this issueWe are not planning to work on this issuedocumentationDocumentation improvementDocumentation improvement
Description
As noted in #2491, the function docstring does not sufficiently explain its difference to forEach and in what circumstances one should use it. The module docstring gives more details, but is still misleading: it does not even mention the, I believe, main property of the function, f being applied at most once to each (structurally equal) subexpression. Thus a much more relevant question as to whether the function should be used might be whether f is much more expensive than p plus expr hashing.
Thus I propose to first confirm and document the intent of the function as well as consider renaming it (such as to forEachOnceWhere) before considering any refactors on top of it.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P-lowWe are not planning to work on this issueWe are not planning to work on this issuedocumentationDocumentation improvementDocumentation improvement