After all syntax tricks I think the quickest way to write it and also have more readable code way is:
While typing the word “sorted”, it appears:
Just press 2 times enter and you get:
Than just type i + tab + j + tab + i < j and you get:
let volunteersSorted3 = volunteerCounts.sorted { (i, j) -> Bool in
i < j
}
- Also I saw that when you write:
In one line it gives that:
- The same like 2) for the last line of code in page 130
Does anyone know what 15 times or 16 times mean? Is that the arrays the function pass until you get the last sorted that you asked?