Use foldl instead of foldl1