Memory on array element assignment

The correct signature is

function foo(::Type{T}) where {T}

Otherwise, you will not get method specialization, and you’ll just get a generic method foo(::DataType)

5 Likes