> 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/compare_a_list_of_strings.md).

# Compare a list of strings

Short-circuiting:

```ruby
1..arr.end -> all{ arr[0] == arr[_] }   # all equal
1..arr.end -> all{ arr[_-1] < arr[_] }  # strictly ascending
```

Non short-circuiting:

```ruby
arr.uniq.len == 1      # all equal
arr == arr.uniq.sort   # strictly ascending
```
