I want to iterate over a list of address and need to require some property for each address. Can someone help me with the syntax?
For example, I have the following state element,
user_is_processing: map(address, bool)
And I want to check each of the user address against this map supplied in the form of a list to a function. I want to require that each user in the list is not already processing, i.e. user_is_processing[user] == false.
Here’s something I’ve written but it doesn’t work.
public stateful entrypoint example(users: list(address)) = require(List.foreach(users, (user) => state.user_is_processing[user] == false))