search for: 01206fc0

Displaying 1 result from an estimated 1 matches for "01206fc0".

Did you mean: 01206dc0
2005 Mar 08
2
Bug in handling of promises?
...to apply non-function So I tried to explicitly force it: > g <- function( H, prevEnv = NULL) { + if (!is.null(prevEnv)) H <- prevEnv$H + force(H) + return(environment(NULL)) + } but this still doesn't work: > env <- g( function(x) x^2 ) > env$H <promise: 01206FC0> > env$H(1) Error: attempt to apply non-function It seems that I need to do an assignment to convert H from a promise to an evaluated object: > h <- function( H, prevEnv = NULL) { + if (!is.null(prevEnv)) H <- prevEnv$H + H <- H + return(environment(NULL)) + } &...