reduce() example for AdamT