jeudi 14 juillet 2016

is it possible to create a generic closure in Swift?


func myfunc<T>(i:T) -> T { return i } is it possible to make this generic function a closure? let myfunc = { <T>(i:T) -> T in return i } this doesn't work...

Aucun commentaire:

Enregistrer un commentaire