Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams.
Ask questions, find answers and collaborate at work with Stack Overflow for Teams. Explore Teams
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
#Haskell, 40
g l@[a,b,c,d]=2*a+3*b+4*c+d+10*minimum l
instead of removing the minimum number from the rest and adding additional 20s, this adds additional 10 for the minimum number.
20
10
g l@[a,b,c,d]=2*a+3*b+4*d+c+10*minimumd]=2*a+3*b+4*c+d+10*minimum l
g l@[a,b,c,d]=2*a+3*b+4*d+c+10*minimum l