ly_subr_ptr<required, optional, rest> {func}
This type builds on ly_scm_func_of_arity and consolidates some code that had been implemented variously in other places. It checks the sanity of the number of each kind of argument at compile time. It also encapsulates resolving overloaded functions and casting to scm_t_subr.