[Rd] callCC in 2.7.0

Gabor Grothendieck ggrothendieck at gmail.com
Tue Apr 1 15:12:14 CEST 2008


Can I suggest some clarification of the help page for callCC
plainly stating that it is intended to exit from a deeply nested
set of calls.

On a casual reading I thought the exact same thing as f.jamitsky.

On Tue, Apr 1, 2008 at 6:32 AM, Luke Tierney <luke at stat.uiowa.edu> wrote:
> No.  First class continuations of the kind provided in scheme can be
> used as a means to implement generators, but downward-only
> continuations as currently provided in R are not sufficient for that.
> This version is intended only as a non-local exit mechanism.
>
> Best,
>
> luke
>
> On Mon, 31 Mar 2008, f.jamitzky wrote:
>
> >
> > callcc is similar to the "yield" keyword in python and c#
> > it lets you define e.g. a generator of lists of numbers.
> >
> >
> >
> >
> > Gabor Grothendieck wrote:
> >>
> >> Would anyone like to explain if callCC in R 2.7.0 gives
> >> anything that on.exit does not already provide?
> >>
> >> It seems that the exit condition once defined cannot
> >> be added to overridden whereas with on.exit multiple
> >> on.exit's add additional on.exits rather than being ignored.
> >>
> >> Is this important?
> >>
> >> ______________________________________________
> >> R-devel at r-project.org mailing list
> >> https://stat.ethz.ch/mailman/listinfo/r-devel
> >>
> >>
> >
> >
>
> --
> Luke Tierney
> Chair, Statistics and Actuarial Science
> Ralph E. Wareham Professor of Mathematical Sciences
> University of Iowa                  Phone:             319-335-3386
> Department of Statistics and        Fax:               319-335-3017
>    Actuarial Science
> 241 Schaeffer Hall                  email:      luke at stat.uiowa.edu
> Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu
>
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>



More information about the R-devel mailing list