Clean up warnings
Optimized rewrite rule for $$ foldM

This is *not* intended to be a final implementation. While this *is*
optimal, the goal is to have a higher-level helper function which
implements this kind of rewrite rule, and then use that function in all
relevant functions in .List.
Optimized fold too
Remove unneeded import