Think of eachrow and eachcol as Vectors of Vectors. first(eachcol(a)) just gives the first column. I think the docs are pretty understandable.
Maybe part of the confusion is maximum on Vector of Vectors. Julia compares vectors elementwise, so that [1, 100] > [1, 2] (I always forget the name for this)
isn’t that a column? it shouldn’t match what eachrow gives you right?
2×2 Matrix{Int64}:
1 2
3 4
1 and 3 form a column, are you from a culture that calls that a row? Eachcol gives you a collection, think of it as [col1, col2], so when you call first(), you’re getting the first column, col1, which is 1 and 3 in the above example.
On the other hand, calling first.() is getting first element of EACH of the columns, of course you get the first row then.
If you add something to the docs, it should probably be map(first, eachcol(a)). Broadcasting over the generator collects it first, which isn’t necessary.
I want to do so… but I just don’t know how… it says “You must be on a branch to propose or make changes to this file”… what could I do? How to be “on” a branch???
But for doc PRs, you can also just click the pencil-like button on the github page, and it will (usually) make a fork and make a branch on that, called patch-1 or something.