Multiple functions with the same name

前端 未结 4 1695
星月不相逢
星月不相逢 2020-11-27 06:51

I\'m new to Swift and I\'ve been going thru some tutorials and many of them define a function more than once with the same name.

I\'m used to other programming langu

4条回答
  •  温柔的废话
    2020-11-27 07:21

    The functions aren't the same they are different . Because they don't take the same arguments and return different things . This is the simple explanation if you don't understand generics.

提交回复
热议问题