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

2012-05-25 Thread Hadley Wickham
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 substitutions. Yup. With a bit more infrastructure you cou

Re: [Rd] equivalent to source() inside a package

2012-05-25 Thread Paul Gilbert
Is there a reason for not using a vignette or putting a file in the demo/ directory? This seems like the sort of thing for which they are intended. Paul On 12-05-25 03:33 PM, Wei Hao wrote: Hi all: I'm working on a project that I have packaged for ease of distribution. The different simula

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

2012-05-25 Thread Yike Lu
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

[Rd] equivalent to source() inside a package

2012-05-25 Thread Wei Hao
Hi all: I'm working on a project that I have packaged for ease of distribution. The different simulations in the package share code, so obviously I have those parts organized as functions. Now, I want to show people my code, but the structure with the internal functions might be a little confusing

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

2012-05-25 Thread Hadley Wickham
> I've been playing around with this for a while. One flaw I found - it > doesn't handle nested Curries very well (the naive implementation in > roxygen/functional does). That's easily fixed: Curry <- function(FUN, ...) { args <- match.call(expand.dots = FALSE)$... args$... <- as.name("...")