/// <summary> /// Gets the boundary production function as determined by a style /// </summary> /// <param name="style">The tuple representation style</param> /// <returns></returns> internal static Func<string, string> boundaryFn(TupleFormatStyle style) => style == TupleFormatStyle.List ? new Func<string, string>(bracket) : style == TupleFormatStyle.Record ? new Func<string, string>(embrace) : new Func<string, string>(paren);
static char rightBoundary(TupleFormatStyle style) => (style == TupleFormatStyle.Coordinate ? rparen() : style == TupleFormatStyle.List ? rbracket() : style == TupleFormatStyle.Record ? rbrace() : rparen())[0];
static char[] bounds(TupleFormatStyle style) => array(leftBoundary(style), rightBoundary(style));
static char leftBoundary(TupleFormatStyle style) => (style == TupleFormatStyle.Coordinate ? lparen() : style == TupleFormatStyle.List ? lbracket() : style == TupleFormatStyle.Record ? lbrace() : lparen())[0];