erlang - Pick larger number from two lists -


i want pick numbers 2 lists of same size list. larger numbers gets picked.

for example:

[1,2,3,4] , [5,5,0,1] ----> [5,5,3,4] 

is there elegant way in erlang this? using list comprehensions maybe?

 lists:map(fun({f,s}) -> max(f, s) end, lists:zip(l1, l2)). 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -