[erlang-questions] lists:mapfind?

Константин Поветкин <>
Mon Aug 21 09:38:27 CEST 2017


> 21 авг. 2017 г., в 10:30, Roger Lipscombe <> написал(а):
> 
> because I came from C#,
> which has 'Single', 'First', etc., and I kinda miss them.

In case of ‘Single’ and ‘First’ you can use erlang:hd() or [FirstOrSingle | _Tail].
If you can provide an example you are getting challenges with, it’ll be easier to suggest you the most suitable erlang way to solve it.
In my experiance: lists:fold[l/r], lists:map, lists:foreach are able to do any kind of jobs.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20170821/ef75dc5b/attachment.html>


More information about the erlang-questions mailing list