Comma quibbling: Difference between revisions
Content deleted Content added
No edit summary |
m whitespace/formatting |
||
Line 17:
=={{header|C#}}==
<lang csharp>public static string Quibble(string[] input)
{
var len =
return "{ " +
String.Join("", input.Take(len - 2).Select(n
.Concat(input.Skip(len < 2 ? len :
+ (input.LastOrDefault() ?? "") + " }";
}
{
}</lang>▼
▲</lang>
{{out}}
<pre>{ }
Line 121 ⟶ 119:
quibble ["ABC"; "DEF"]
quibble ["ABC"; "DEF"; "G"]
quibble ["ABC"; "DEF"; "G"; "H"]</lang>
=={{header|Perl 6}}==
Line 219 ⟶ 216:
End
Return '{'result'}'</lang>
{{out}}
<pre>
|