| Home | Libraries | People | FAQ | More

## Function template for_each_n

boost::algorithm::for_each_n

## Synopsis

    // In header: <boost/algorithm/cxx17/for_each_n.hpp>

    template<typename InputIterator, typename Size, typename Function>
      InputIterator for_each_n(InputIterator first, Size n, Function f);

## Description

| Note
If f returns a result, the result is ignored.

Parameters: |
`first` | The start of the first range.
`n` | One past the end of the first range.
`f` | A functor to apply to the elements of the sequence
Returns: | first + n