Open hadley opened 1 year ago
Related to #320, we need some way to register methods for group generics. I think the syntax should probably look something like this?
library(S7) foo <- new_class("foo", class_integer) method(Math, foo) <- function(x) { foo(Math(super(x, class_integer))) } method(Ops, list(foo, class_any)) <- function(x, y) { foo(Ops(super(x, class_integer), y)) } method(Ops, list(class_any, foo)) <- function(x, y) { foo(Ops(x, super(y, class_integer))) }
Related to #320, we need some way to register methods for group generics. I think the syntax should probably look something like this?