powered by
FunctionGenerator(x)
FunctionGenerator
function
getReaders
funGen <- FunctionGenerator(function(y, ...) { if (is(y, "integer")) function(x) x+1 else function(x) x-1 }) funGen funGen(3L) funGen("a")
Run the code above in your browser using DataLab