mirror of
https://github.com/encounter/Petari.git
synced 2026-03-30 11:34:15 -07:00
15 lines
295 B
Plaintext
15 lines
295 B
Plaintext
#ifndef ALGORITHM_H
|
|
#define ALGORITHM_H
|
|
|
|
#include <functional.hpp>
|
|
|
|
template<class InputIterator, class Function>
|
|
inline Function for_each(InputIterator first, InputIterator last, Function f) {
|
|
for (; first != last; ++first) {
|
|
f(*first);
|
|
}
|
|
|
|
return f;
|
|
}
|
|
|
|
#endif // ALGORITHM_H |