HISKP-LQCD/hadron

extract_mass generic looks funny

Closed this issue · 1 comments

extract_mass <- function (object) {
UseMethod('extract_mass')
}

Should't this be UseMethod('extract_mass', object) or is the first parameter implicit?

It's passed implicitly:

You don’t pass any of the arguments of the generic to UseMethod(); it uses deep magic to pass to the method automatically. The precise process is complicated and frequently surprising, so you should avoid doing any computation in a generic. To learn the full details, carefully read the Technical Details section in ?UseMethod. — Hadley, Advanced R