[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Alternatives to for loops in PlusCal


I am trying to perform the following operation in PlusCal

\* list = {o1, o2}
' = [obj \in Objects |->
                    IF obj \in list
                    THEN [ballots[o] EXCEPT ![a] = obal]
                    ELSE ballots[obj]]

ballots is a function, and I only want to modify part of the function indicated by the list set.
In programming, I can accomplish with a for loop, but PlusCal doesn't have one.

Any ideas?