powered by
+
Foo
"+"(x, y)
y
x
structure(list(1), class = "Foo") + 2 z = list("a") class(z) = "Foo" z + letters z + 5 + matrix(1:4, 2) # you can add arbitrary objects to z methods("+") # check the methods on +
Run the code above in your browser using DataLab