Limit of Teal language

One example is that branching is limited; you can’t go back in the code (to a previous instruction), TEAL moves only forward. However, you can skip parts of the code depending on a condition.

So you can’t loop. However, creating contracts is very cheap. So you should try to do as much computation as you can beforehand (like collecting participants of a shared fund), and then put them into the contract concretely.