This Commented CUE demonstrates how to use the built-in function list.IsSortedStrings to test and report if lists of strings are sorted alphabetically.

file.cue
package example

import "list"

_unsorted: ["B", "C", "A"]
_sorted: ["A", "B", "C"]

testUnsorted: list.IsSortedStrings(_unsorted)
testSorted:   list.IsSortedStrings(_sorted)
TERMINAL
$ cue eval
testUnsorted: false
testSorted:   true