-
Notifications
You must be signed in to change notification settings - Fork 41
Open
Milestone
Description
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)))
}Metadata
Metadata
Assignees
Labels
No labels