Can I do something like this? testMatrix(x::Array{1}) = println("It is 1-dimensional.") testMatrix(x::Array{2}) = println("It is 2-dimensional.")
The above does not work because Array{1} == Array{1, N} One solution is testMatrixAgain{T}(x::Array{T, 1}) = println("It is 1-dimensional.") testMatrixAgain{T}(x::Array{T, 2}) = println("It is 2-dimensional.") However, the parametric type is actually not used. Is there any way that I don't need the parametric type?