> For the complete documentation index, see [llms.txt](https://trizen.gitbook.io/sidef-lang/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://trizen.gitbook.io/sidef-lang/programming_tasks/c/comma_quibbling.md).

# Comma quibbling

```ruby
func comma_quibbling(words) {
    '{' + ([words.first(-1).join(', ')]-[''] + [words.last] -> join(' and ')) + '}'
}

[<>, <ABC>, <ABC DEF>, <ABC DEF G H>].each { |w|
    say comma_quibbling(w)
}
```

#### Output:

```
{}
{ABC}
{ABC and DEF}
{ABC, DEF, G and H}
```
