7 lines
197 B
Text
7 lines
197 B
Text
func comma_quibbling(words) {
|
|
'{' + ([words.ft(0, -2).join(', ')]-[''] + [words.last] -> join(' and ')) + '}';
|
|
}
|
|
|
|
[<>, <ABC>, <ABC DEF>, <ABC DEF G H>].each { |w|
|
|
say comma_quibbling(w);
|
|
}
|