The Go sort package sorts host slices in place. sort.Strings rearranges a []string. vec copies it back to a vector for printing. |
(def fruits (go/append (go/make (go/slice-of go/string))
"pear" "apple" "grape"))
(sort.Strings fruits)
(println (vec fruits))
|