We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
于是设计点要考虑:
或者: 我们特地对每个函数的返回类型来做判断,
.(int) 之类的assert是必要的,因为会有 Enum.Sum([]int{1,2,3,4} 或者 Enum.Sum([]float{1.1,2.2,3.3} 这样子的Enum函数,
然后你想想,对于这些函数,是不是我们完全没办法知道里面的类型,除非特地去Sum进行判断。
所以我明确的要求调用方要: Enum.Sum([]int{1,2,3,4}) . (int) 来告诉我,这个函数调用是想得到什么样的结果,不然我完全没办法知道结果是什么
The text was updated successfully, but these errors were encountered:
No branches or pull requests
于是设计点要考虑:
或者:
我们特地对每个函数的返回类型来做判断,
比如: Enum.Sum([]int{12.,.3 } 我们对sum,就肯定是 参数的类型,非数组
Enum.All([]int{...}, func) 结果肯定是 func的类型,bool这个没问题
Enum.Recuce 也是func的类型
Enum.find([]int{...}, 43) 结果就是 第一个参数的类型。
诸如此类
.(int) 之类的assert是必要的,因为会有 Enum.Sum([]int{1,2,3,4} 或者 Enum.Sum([]float{1.1,2.2,3.3} 这样子的Enum函数,
然后你想想,对于这些函数,是不是我们完全没办法知道里面的类型,除非特地去Sum进行判断。
所以我明确的要求调用方要: Enum.Sum([]int{1,2,3,4}) . (int) 来告诉我,这个函数调用是想得到什么样的结果,不然我完全没办法知道结果是什么
The text was updated successfully, but these errors were encountered: