tree/xfn.go
func (w Wrap) Call(c Ctx, args ...Result) (Result, error) {
	switch w.LastArgOpt {
	case Optional:
		if len(args) == w.NArgs || len(args) == w.NArgs-1 {
			return w.Fn(c, args...)
		}
	case Variadic:
		if len(args) >= w.NArgs-1 {
			return w.Fn(c, args...)
		}
	default:
		if len(args) == w.NArgs {
			return w.Fn(c, args...)
		}
	}
	return nil, fmt.Errorf("Invalid number of arguments")
}
func (w Wrap) Call(c Ctx, args ...Result) (Result, error) {
	switch w.LastArgOpt {
	case Optional:
		if len(args) == w.NArgs || len(args) == w.NArgs-1 {
			return w.Fn(c, args...)
		}
	case Variadic:
		if len(args) >= w.NArgs-1 {
			return w.Fn(c, args...)
		}
	default:
		if len(args) == w.NArgs {
			return w.Fn(c, args...)
		}
	}
	return nil, fmt.Errorf("Invalid number of arguments")
}
//Call checks the arguments and calls Fn if they are valid