At the moment model_field is a list. This is not very handy because sometimes we only pass a type check functions,
so that we always have to test if it is a list or a function. Use attributes instead:
model_field <- function(fn, default = NA) {
structure(fn, default = default, class = "model_field")
}
At the moment model_field is a list. This is not very handy because sometimes we only pass a type check functions,
so that we always have to test if it is a list or a function. Use attributes instead: