10-02-2020, 09:27 AM
Ok I get it.
With your last post, if you use
(and
(forEach Site <region> <moves1>)
(forEach Site <region> <moves2>)
)
The moves will be all computed in a sequence and will modify the state one by one in following this sequence. But the computation of the second forEach will be done before to apply the first forEach
However if you modify a part of the state in the first forEach, that will affect the modification of the state by the second forEach if the same elements are used.
For the other post with the (do <moves1> next:<moves2>) that's better.
because here you are sure at 100% to apply completely the moves1 (and so modifying the state) before to even compute the moves generating by moves2 and then applying them.
So I think yes if you want to modify a part of the state (modifying a variable) before to compute another move, you should use the Do ludeme.
Regards,
Eric
With your last post, if you use
(and
(forEach Site <region> <moves1>)
(forEach Site <region> <moves2>)
)
The moves will be all computed in a sequence and will modify the state one by one in following this sequence. But the computation of the second forEach will be done before to apply the first forEach
However if you modify a part of the state in the first forEach, that will affect the modification of the state by the second forEach if the same elements are used.
For the other post with the (do <moves1> next:<moves2>) that's better.
because here you are sure at 100% to apply completely the moves1 (and so modifying the state) before to even compute the moves generating by moves2 and then applying them.
So I think yes if you want to modify a part of the state (modifying a variable) before to compute another move, you should use the Do ludeme.
Regards,
Eric