From byron.ellis at gmail.com  Thu Nov  1 20:00:27 2007
From: byron.ellis at gmail.com (Byron Ellis)
Date: Thu, 1 Nov 2007 12:00:27 -0700
Subject: [Rd] Curry: proposed new functional programming, er, function.
Message-ID: <7098abec0711011200va3851o811f60bb100616ce@mail.gmail.com>

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



[Rd] Curry: proposed new functional programming, er, function.
Byron Ellis