Sorting a list by increasing order

### 6.3.18 Sorting a list by increasing order

The SortA command sorts a list or a matrix in increasing order.

- SortA takes L, a list.
- If L is not a matrix, then SortA(L) returns a copy of L with the elements in increasing order (if L is not a matrix).
- If L is a matrix, then SortA(L) returns a copy of L with columns sorted according to increasing order in the first row.

#### Examples

SortA([3,4,2])

| ⎡ ⎣ | 2,3,4 | ⎤ ⎦

SortA([[3,4,2],[6,4,5]])

⎡ ⎢ ⎣ |
2 | 3 | 4
5 | 6 | 4
| ⎤ ⎥ ⎦