[FOLD] Use auto instead of std::function