
function_ref is non-owning, so if we get it as a parameter in constructor, our reference goes out-of-scope as soon as constructor returns. Instead, let's just take it as a parameter to the actual `generate()` call
function_ref is non-owning, so if we get it as a parameter in constructor, our reference goes out-of-scope as soon as constructor returns. Instead, let's just take it as a parameter to the actual `generate()` call