This is not what I meant (I’ve edited the post to make that clearer). I am looking for a way to naturally express that a result of a computation changes how the computation progresses. In a*(b+c) + (1-a)*(b-c) you compute both (b+c)and (b-c) . This is not what actually happens in the program.
The curried node is an interesting idea but breaks down if we move away from this toy example. If both branches contain subgraphs with a different amount of nodes and different connections between them then currying does not work (or is very unnatural).
This is not what I meant (I’ve edited the post to make that clearer). I am looking for a way to naturally express that a result of a computation changes how the computation progresses. In
a*(b+c) + (1-a)*(b-c)
you compute both(b+c)
and(b-c)
. This is not what actually happens in the program.The curried node is an interesting idea but breaks down if we move away from this toy example. If both branches contain subgraphs with a different amount of nodes and different connections between them then currying does not work (or is very unnatural).
(Currying is a nice idea so yes)