I saw the following code while doing some leetcode in prep for interview season:
auto select = [](const string& log)
{
auto index = log.find(' ') + 1;
return ::isalpha(log[index]);
};
what is the function of the auto select = []
more specifically the auto = []
part
interestingly, this function was able to be used as a predicate in an STL function