```
template<class InputIterator, class Function>
constexpr Function for_each(InputIterator first, InputIterator last, Function f);
```

Effects:
Applies
f to the result of dereferencing every iterator in the range
[first, last),
starting from
first
and proceeding to
last - 1.

```
template<class ExecutionPolicy, class ForwardIterator, class Function>
void for_each(ExecutionPolicy&& exec,
ForwardIterator first, ForwardIterator last,
Function f);
```

Implementations do not
have the freedom granted under [algorithms.parallel.exec] to make arbitrary
copies of elements from the input sequence.

```
template<class InputIterator, class Size, class Function>
constexpr InputIterator for_each_n(InputIterator first, Size n, Function f);
```

```
template<class ExecutionPolicy, class ForwardIterator, class Size, class Function>
ForwardIterator for_each_n(ExecutionPolicy&& exec, ForwardIterator first, Size n,
Function f);
```