suppose i need to verify a condition on the elements of a list but i want to verify that it holds at least for one and not for every single one.
where “containsLA” is a predicate on lists that is true if a List contains a consecutive L sequence of A elements.
What i’d like to express in the “maplist” statement is that “it exists in the Plan (which is a list of lists) a list that has a sequence L of “A” elements”.
But obviously with maplist i get a predicate that is true if every list has a sequence L of A elements.
Is there any library implementation of a variant of maplist that lets me do such a thing?