Commit 505190fb authored by Aleix Pol Gonzalez's avatar Aleix Pol Gonzalez 🐧
Browse files

forgot file

parent 9101a2d2
......@@ -50,6 +50,17 @@ static T kTransform(const Q &input, _UnaryOperation op)
return ret;
}
template <typename T, typename Q, typename _UnaryOperation>
static T kAppend(const Q &input, _UnaryOperation op)
{
T ret;
ret.reserve(input.size());
for(const auto& v : input) {
ret.append(op(v));
}
return ret;
}
template <typename T, typename Q, typename _UnaryOperation>
static T kFilter(const Q &input, _UnaryOperation op)
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment