Public
Snippet $1655241 authored by Jesse

Replace function with lambda

lamda.cpp
// Replace the following function with a lambda
 
// Function
bool str_is_digits( const std::string &str )
{
    return std::all_of( str.begin(), str.end(), ::isdigit );
}
 
// Function as a Lambda
[ &line ] () { return std::all_of( line.begin(), line.end(), ::isdigit ); }