Avoid using yield and return with value inside a function | CAST Appmarq