31 #ifndef LEDGER_CORE_FUNCTIONAL_HPP 32 #define LEDGER_CORE_FUNCTIONAL_HPP 39 namespace functional {
41 template <
typename FromType,
typename ToType>
42 std::vector<ToType> map(
const std::vector<FromType>& container, std::function<ToType (
const FromType&)> f) {
43 std::vector<ToType> result(container.size());
45 for (
auto& item : container) {
46 result[index] = f(item);
56 #endif //LEDGER_CORE_FUNCTIONAL_HPP Definition: Account.cpp:8