In fact, the docs for ?eachcol is very confusing:
Example
≡≡≡≡≡≡≡≡≡
julia> a = [1 2; 3 4]
2×2 Matrix{Int64}:
1 2
3 4
julia> first(eachcol(a))
2-element view(::Matrix{Int64}, :, 1) with eltype Int64:
1
3
reading the example above would be confused with the naming of eachrow vs eachcol. It also gives an improper usage !!
actually the example should be provided as:
julia> a = [1 2; 3 4]
2×2 Matrix{Int64}:
1 2
3 4
julia> first.(eachcol(a))
2-element Vector{Int64}:
1
2
hope it helps.