Julia: function f(x::Vector{Integer})
Bonjour
Savez-vous pourquoi la fonction test ne marche pas alors que la fonction test2 marche ?
EDIT: Et cette fonction marche bien:
Savez-vous pourquoi la fonction test ne marche pas alors que la fonction test2 marche ?
function test(x::Vector{Integer}) return x end function test2(x::Vector{T}) where T<:Integer return x end
EDIT: Et cette fonction marche bien:
function test(x::Integer) return x end
Connectez-vous ou Inscrivez-vous pour répondre.
Réponses