Use foldr1 instead of foldl1.
Use foldr1 instead of foldl1.

foldl is typically the wrong thing to do, since if you give it a very
long list it will consume a lot of memory dealing with thunks.  Here,
using the foldr version should produce the same results.

There's one other use of foldl, but it's in command line argument
processing which should be fine.

atodorov/bdcs,weldr/bdcs