I’m trying to write a template that ensure
that a particular party is in a list of Parties. How do I go about checking this? Do I need to convert the Party to a singleton before checking isInfixOf
?
isInfixOf
I believe you can use elem
, which you can find documented here.
If you need to find other functions, I can wholeheartedly recommend using the search function in the documentation. If you look for a Daml type, you will be returned with relevant results. In this case, I looked for [a] -> a -> Bool
as I was looking for a function that, given a list of a
and a specific a
could return me a boolean indicating whether the element is in the list or not.
1 Like