I have a list with tuples in Erlang for example:
[{1, "AAA"}, {2, "AAA"}, {3, "AAAAAAAA"}]
How can i get tuple from this list with max first element from this tuples?
Thank you.
In this case lists:max/1 will return what you want. For this to work all tuples must have the same number of elements.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With