From f.jamitzky at gmail.com  Tue Apr  1 15:24:35 2008
From: f.jamitzky at gmail.com (Dr. Ferdinand Jamitzky)
Date: Tue, 1 Apr 2008 15:24:35 +0200
Subject: [Rd] callCC in 2.7.0
In-Reply-To: <Pine.LNX.4.64.0804010528270.14754@nokomis.stat.uiowa.edu>
References: <971536df0803300710t40f61256x78b9889a5c323924@mail.gmail.com>
	<16395614.post@talk.nabble.com>
	<Pine.LNX.4.64.0804010528270.14754@nokomis.stat.uiowa.edu>
Message-ID: <6d7785c00804010624t67ef9b0fw9ddf447da744de0d@mail.gmail.com>

Anyway something like "yield" would be very nice to have.
Would it be hard to implement?
It could be in a similar way to scala where you can define for-comprehensions.
I really miss them in R.
best wishes
ferdinand

On Tue, Apr 1, 2008 at 12:32 PM, 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
>



-- 
#################################################################################
Dr. Ferdinand Jamitzky

Leibniz Supercomputing Centre
of the Bavarian Academy of Sciences and Humanities
Boltzmannstra?e 1
85748 Garching bei M?nchen
Phone: ++49-89-35831-8727
Fax: ++49-89-35831-9700
Mobile: 0177 - 829 3 649
e-mail: jamitzky at lrz.de

#################################################################################



[Rd] callCC in 2.7.0
Dr. Ferdinand Jamitzky