public object[] Apply(FunctionParameterBindings parameterBindings) { var values = new object[parameterBindings.Arity]; for (int i = 0; i < values.Length; i++) { var binding = parameterBindings.GetBinding(i); var value = FindValue(binding.ParameterType); if (value == null) { values[i] = binding.DefaultValue; } else { values[i] = value; } } return(values); }