This Commented CUE demonstrates how to produce a list of unique strings from a list of strings that might include duplicate values.

file.cue
package example

import "list"

stringList: ["d", "a", "b", "a", "c", "b", "b"]

stringSet: {
	let map = {for v in stringList {(v): _}}
	list.SortStrings([for k, _ in map {k}])
}
TERMINAL
$ cue eval
stringList: ["d", "a", "b", "a", "c", "b", "b"]
stringSet: ["a", "b", "c", "d"]