[Rd] Curry: proposed new functional programming, er, function.
Hadley Wickham
hadley at rice.edu
Wed May 4 16:29:21 CEST 2011
I thought I might bring this up again - it now seems like Curry would
be a natural fit with Reduce, Filter, Find, Map, Negate and Position.
Any chance we might see this in a future version of R?
Hadley
On Thu, Nov 1, 2007 at 2:00 PM, Byron Ellis <byron.ellis at gmail.com> wrote:
> Hi all (especially R-core) I suppose,
>
> With the introduction of the new functional programming functions into
> base I thought I'd ask for a Curry() function. I use a simple one that
> looks this:
>
> Curry = function(FUN,...) { .orig = list(...);function(...)
> do.call(FUN,c(.orig,list(...))) }
>
> This comes in really handy when using say, heatmap():
>
> heatmap(mydata,hclustfun=Curry(hclust,method="average"))
>
> or other functions where there are ... arguments, but it's not clear
> where they should end up.
>
> --
> Byron Ellis (byron.ellis at gmail.com)
> "Oook" -- The Librarian
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel
>
--
Assistant Professor / Dobelman Family Junior Chair
Department of Statistics / Rice University
http://had.co.nz/
More information about the R-devel
mailing list