Added an utility function to fold a list of expressions and completely remove the unused members. No known use besides FOR.