Open iqis opened 3 years ago
require(Q7) BaseType <- type(function(a){ b <- 1 f <- function(){ a + b } }) bt <- BaseType(2) bt$f() ExtendedType <- type(function(b){ extend(BaseType)(b) g <- function(){ b } }) et <- ExtendedType(3) et$b #1 et$f() #2 et$g() #1
Users may have assumed of the opposite.
Users may have assumed of the opposite.