Generic way to apply function to a dimension of a matrix

Just be aware that eachrow iterate over Vectors not Arrays{T, 2} of dimensions 1xN, this confused a colleague of mine when he started using Julia.