I just realized that even in the non-nested case, calling from top level
"broke" some of my code "inexplicably", since the globally stored
function call gets overridden if you call Curry again. So old Curried
functions break.
Glad to have this fix.
On 5/25/2012 5:23 PM, Hadley Wickham wrote:
On 5/25/12 5:23 PM, Hadley Wickham wrote:
On Fri, May 25, 2012 at 3:14 PM, Yike Lu wrote:
So here's the way I'm reading this:
Original:
curry_call is the function body you're constructing, which is itself just a
one liner which calls the symbol FUN with the appropriate subst
So here's the way I'm reading this:
Original:
curry_call is the function body you're constructing, which is itself
just a one liner which calls the symbol FUN with the appropriate
substitutions.
call("function", [...]) calls the "function" function, which itself
takes 2 arguments: the list o
Hadley Wickham-2 wrote
>
> Curry <- function(FUN, ...) {
> args <- match.call(expand.dots = FALSE)$...
> args$... <- as.name("...")
>
> env <- parent.frame()
>
> if (is.name(FUN)) {
> fname <- FUN
> } else if (is.character(FUN)) {
> fname <- as.