Is there an elegant way of extracting the upper triangle of a matrix as a vector using `Base`

? Besides, of course, writing something like

```
function vec_triu(M::AbstractMatrix{T}) where T
m, n = size(M)
m == n || throw(error("not square"))
l = n*(n+1) ÷ 2
v = Vector{T}(l)
k = 0
for i in 1:n
v[k + (1:i)] = M[1:i, i]
k += i
end
v
end
```

so that

```
julia> vec_triu(reshape(1:9, 3, :))
6-element Array{Int64,1}:
1
4
5
7
8
9
```