[R] return inconsistency?
    Ivan Krylov 
    |kry|ov @end|ng |rom d|@root@org
       
    Wed Apr 30 15:27:45 CEST 2025
    
    
  
On Wed, 30 Apr 2025 11:15:02 +0200
Ralf Goertz via R-help <r-help using r-project.org> wrote:
> If this is not an error what is its purpose?
From the point of view of the R syntax, everything is an expression.
One of the uses of return() being an expression is base::callCC(). The
ability to use it inside an expression makes it possible to put it into
a delayed-evaluation object and offer it as a continuation point to
another function.
Admittedly obscure, but sometimes useful.
-- 
Best regards,
Ivan
    
    
More information about the R-help
mailing list