[ideas] A pattern target where each branch has a dependency on the previous branch. #1285
Closed
rowanclarke
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
With dynamic branching, this would not be feasible for |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Help
Description
I often need to know the intermediate results of performing a reduction over a pattern - something akin to
purrr::accumulate
- which I don't think is currently possible.The following is an example of how to use such a feature:
The benefit comes when we change
x
toc(1, 2, 4)
- the first two branches ofy
can be skipped.I'd be very keen to hear your thoughts on this - whether it aligns with the design of
targets
and how it could be implemented. I've tried implementing it myself by just inserting new dependencies before creating the junction and it seems to work as described.Beta Was this translation helpful? Give feedback.
All reactions