31 #ifndef LEDGER_CORE_VECTOR_HPP 32 #define LEDGER_CORE_VECTOR_HPP 42 std::vector<T> concat(
const std::vector<T>& a,
const std::vector<T>& b) {
43 std::vector<T> result;
44 result.reserve(a.size() + b.size());
45 result.insert(result.end(), a.begin(), a.end());
46 result.insert(result.end(), b.begin(), b.end());
50 template <
typename U,
typename T>
51 inline std::vector<U> map(
const std::vector<T>& source,
52 const std::function<U (
const T&)>& f) {
54 for (
const auto& item : source) {
55 out.push_back(f(item));
64 #endif //LEDGER_CORE_VECTOR_HPP Definition: Account.cpp:8