```
template<class InputIterator, class OutputIterator>
constexpr OutputIterator
partial_sum(InputIterator first, InputIterator last,
OutputIterator result);
template<class InputIterator, class OutputIterator, class BinaryOperation>
constexpr OutputIterator
partial_sum(InputIterator first, InputIterator last,
OutputIterator result, BinaryOperation binary_op);
```

The result of the
expression std::move(acc) + *i or binary_op(std::move(acc), *i)
is implicitly convertible to InputIterator's value type.

For every iterator i in [first + 1, last) in order,
acc is then modified by
acc = std::move(acc) + *i or acc = binary_op(std::move(acc), *i)
and the result is assigned to *(result + (i - first)).