private static IEnumerable<FunctionSymbol> Create1(
string name, string documentation, TypeSymbol[] types,
string parameterName, string parameterDocumentation,
params TypeSymbol[] overrideReturnTypes)
{
if (overrideReturnTypes.Length == 0)
overrideReturnTypes = null;
else if (overrideReturnTypes.Length == 1)
overrideReturnTypes = Enumerable.Repeat(overrideReturnTypes[0], types.Length).ToArray();
return types.Select((type, i) => new FunctionSymbol(
name, documentation, null, overrideReturnTypes?[i] ?? type,
f => new []
{
new ParameterSymbol(parameterName ?? "value", parameterDocumentation ?? "The specified value.", f, type)
}));
}