[erlang-questions] How to return first {Key, Value} from Map where Predicate is true
Björn-Egil Dahlberg
egil@REDACTED
Thu Jan 8 19:10:22 CET 2015
Obviously there is a need for iterators. Map comprehensions will not
work well without it.
It's already on the TODO list ..
On 2015-01-08 18:46, Imants Cekusins wrote:
> An iterator function with a break option would be very useful, too.
>
> Even the current maps:fold function could be modified to allow break:
>
> fold(Fun, Init, Map) -> Acc
>
> Types:
>
> Fun = fun((K, V, AccIn) -> AccOut)
>
> modify to:
> Fun = fun((K, V, AccIn) -> AccOut | {break, AccOut})
>
> ?
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
More information about the erlang-questions
mailing list