gpt4 book ai didi

swift - Swift 中的所有数字都遵循什么协议(protocol)?

转载 作者:行者123 更新时间:2023-11-28 12:46:57 25 4
gpt4 key购买 nike

<分区>

我试图找出 Swift 中的协议(protocol),所以我有一个只接受 Numbers 的函数。我希望能够传递 IntDoubleFloatFloat数字

func takeNumbers(A: Protocol1, Protocol2, B: Protocol1, Protocol2) {

}

我只是列出了两个协议(protocol),我不知道是否需要 1、2、3 等。

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com