<p dir="ltr">Let's change the predicate so it does something with the found key-value pair (what would you do with the match when you found it?).</p>
<p dir="ltr">Then you could maps:to_list and pass this side-effect predicate to lists:any.</p>