Hello DAML people,
I apologize for the straightforward question, yet, I’m not very good at Haskell nor Mapping functions.
Assume that I have the Template below;
template Agreement with signatories: [Party] observers : [Party] where observer observers signatory signatories ensure unique signatories
I want to have only chosen parties as signatories or observers. Therefore I need some kind of mapping through them. It might be something similar to this:
ensure signatories `elem` mapOptional partyFromText ["Jean", "Pierre", "Paul"]
In order to iterate through each single party in “signatories” or “observers” lists in a way that these parties are assured to be one of the named parties who are specified explicitly there.
In the end, No signatory or observer that is not specified in the given list can be added to signatories or observers. Thank you.