The reason for this rather untransparent device is that primitive
functions such as sin() behave somewhat differently from other
functions. We have:
Sin <- as.vf(function(x){sin(x)})
setMethod("sin", "vf", function(x){as.vf(function(o){Sin(x(o))})})
We define Sin() to be an object of class vf; the call to
setMethod() ensures that Sin(f) operates as intended.