numeric algorithm adjacent_difference

Nit: `result` could be forwarded, both here and in `partial_sum`.