Re: [R] functional programming question

From: Gabor Grothendieck <ggrothendieck_at_gmail.com>
Date: Sun 05 Feb 2006 - 05:34:07 EST

See:

http://finzi.psych.upenn.edu/R/Rhelp02a/archive/54896.html

On 2/4/06, Erich Neuwirth <erich.neuwirth@univie.ac.at> wrote:
> Many functional programming languages have a metafunction
> which does the following:
> it has two arguments, a function and a list of objects, all of the same
> type.
> The argument function itself has two arguments of the same type as all
> the list objects, and the result of this function also is of the same type.
> then
> metafunction(f,list(x1,x2,....xn)) produces
> f(x1,f(x2,f(x3,....,f(xn-1,xn)))..)
> Does R have such a function, or do I need to code it myself?
> In Scheme (Mathematica), this metafunction is called fold (Fold).
>
>
> --
> Erich Neuwirth, University of Vienna
> Faculty of Computer Science
> Computer Supported Didactics Working Group
> Visit our SunSITE at http://sunsite.univie.ac.at
> Phone: +43-1-4277-39464 Fax: +43-1-4277-39459
>
> ______________________________________________
> R-help@stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
>



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Sun Feb 05 05:44:28 2006

This archive was generated by hypermail 2.1.8 : Sun 05 Feb 2006 - 14:30:12 EST