[erlang-questions] How to return first {Key, Value} from Map where Predicate is true

Imants Cekusins imantc@REDACTED
Thu Jan 8 12:03:06 CET 2015


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?).

Then you could maps:to_list and pass this side-effect predicate to
lists:any.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150108/56d7c802/attachment.htm>


More information about the erlang-questions mailing list