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

css - I want to align grid in center -

Contact Form PHP Email Script -

python - SWIG function not printing output -