Comma quibbling: Difference between revisions
Content added Content deleted
m (→{{header|Haskell}}: Tidied) |
m (→{{header|Sidef}}: update) |
||
Line 4,231: | Line 4,231: | ||
=={{header|Sidef}}== |
=={{header|Sidef}}== |
||
<syntaxhighlight lang="ruby">func comma_quibbling(words) { |
<syntaxhighlight lang="ruby">func comma_quibbling(words) { |
||
'{' + ([words. |
'{' + ([words.first(-1).join(', ')]-[''] + [words.last] -> join(' and ')) + '}' |
||
} |
} |
||
[<>, <ABC>, <ABC DEF>, <ABC DEF G H>].each { |w| |
[<>, <ABC>, <ABC DEF>, <ABC DEF G H>].each { |w| |
||
say comma_quibbling(w) |
say comma_quibbling(w) |
||
}</syntaxhighlight> |
}</syntaxhighlight> |
||
{{out}} |
{{out}} |